linux-stable/security/selinux
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
..
include mctp: Add MCTP base 2021-07-29 15:06:49 +01:00
ss selinux: fix double free of cond_list on error paths 2022-02-08 18:34:02 +01:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
avc.c selinux: kill 'flags' argument in avc_has_perm_flags() and avc_audit() 2021-06-11 13:11:45 -04:00
hooks.c selinux: fix potential memleak in selinux_add_opt() 2022-01-27 11:03:43 +01:00
ibpkey.c selinux: remove unused global variables 2021-01-12 09:49:01 -05:00
ima.c selinux: fix misuse of mutex_is_locked() 2022-03-02 11:47:48 +01:00
Kconfig Documentation,selinux: deprecate setting checkreqprot to 1 2020-02-10 10:49:01 -05:00
Makefile selinux: include a consumer of the new IMA critical data hook 2021-01-14 23:41:46 -05:00
netif.c selinux: remove unused global variables 2021-01-12 09:49:01 -05:00
netlabel.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
netlink.c selinux: mark some global variables __ro_after_init 2021-01-12 10:08:55 -05:00
netnode.c selinux: remove unused global variables 2021-01-12 09:49:01 -05:00
netport.c selinux: remove unused global variables 2021-01-12 09:49:01 -05:00
nlmsgtab.c include/uapi/linux/xfrm.h: Fix XFRM_MSG_MAPPING ABI breakage 2021-09-14 10:31:35 +02:00
selinuxfs.c selinux/stable-5.13 PR 20210426 2021-04-27 13:42:11 -07:00
status.c selinux: move status variables out of selinux_ss 2020-02-10 10:49:01 -05:00
xfrm.c selinux: delete selinux_xfrm_policy_lookup() useless argument 2021-05-10 21:38:31 -04:00