diff options
author | Ondrej Mosnacek <omosnace@redhat.com> | 2022-02-21 15:06:49 +0100 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2022-02-22 18:02:58 -0500 |
commit | ce2fc710c9d2b25afc710f49bb2065b4439a62bc (patch) | |
tree | c6149fbab72c150eb0499535bdfaef55e871c7e5 /Kconfig | |
parent | 186edf7e368c40d06cf727a1ad14698ea67b74ad (diff) | |
download | linux-ce2fc710c9d2b25afc710f49bb2065b4439a62bc.tar.bz2 |
selinux: fix misuse of mutex_is_locked()
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: 2554a48f4437 ("selinux: measure state and policy capabilities")
Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'Kconfig')
0 files changed, 0 insertions, 0 deletions