Re: [PATCH] selinux: fix misuse of mutex_is_locked()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 21, 2022 at 9:06 AM Ondrej Mosnacek <omosnace@xxxxxxxxxx> wrote:
>
> 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).
>
> Fixes: 2554a48f4437 ("selinux: measure state and policy capabilities")
> Signed-off-by: Ondrej Mosnacek <omosnace@xxxxxxxxxx>
> ---
>  security/selinux/ima.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Merged into selinux/stable-5.17, thanks.  Assuming no surprises during
testing I'll send this up to Linus tomorrow.

-- 
paul-moore.com



[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux