linux/security
Ondrej Mosnacek af091cc27e selinux: fix misuse of mutex_is_locked()
commit ce2fc710c9 upstream.

mutex_is_locked() tests whether the mutex is locked *by any task*, while
here we want to test if it is held *by the current task*. To avoid
false/missed WARNINGs, use lockdep_assert_is_held() and
lockdep_assert_is_not_held() instead, which do the right thing (though
they are a no-op if CONFIG_LOCKDEP=n).

Cc: stable@vger.kernel.org
Fixes: 2554a48f44 ("selinux: measure state and policy capabilities")
Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-03-02 11:47:48 +01:00
..
apparmor
bpf
integrity ima: Do not print policy rule with inactive LSM labels 2022-02-16 12:56:04 +01:00
keys
landlock
loadpin
lockdown
safesetid
selinux selinux: fix misuse of mutex_is_locked() 2022-03-02 11:47:48 +01:00
smack
tomoyo tomoyo: use hwight16() in tomoyo_domain_quota_is_ok() 2022-01-05 12:42:33 +01:00
yama
commoncap.c
device_cgroup.c
inode.c
Kconfig
Kconfig.hardening
lsm_audit.c
Makefile
min_addr.c
security.c