ima: annotate iint mutex to avoid lockdep false positive warnings
authorAmir Goldstein <amir73il@gmail.com>
Thu, 5 Oct 2023 11:15:58 +0000 (14:15 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Nov 2023 17:20:03 +0000 (17:20 +0000)
commit1eb840f104c0c1fda8c5f7e9485b87882b88b952
tree290a5af0f58714b1a9c3108aa9aa25804830515a
parentaffae18838db5e6b463ee30c821385695af56dc2
ima: annotate iint mutex to avoid lockdep false positive warnings

commit e044374a8a0a99e46f4e6d6751d3042b6d9cc12e upstream.

It is not clear that IMA should be nested at all, but as long is it
measures files both on overlayfs and on underlying fs, we need to
annotate the iint mutex to avoid lockdep false positives related to
IMA + overlayfs, same as overlayfs annotates the inode mutex.

Reported-and-tested-by: syzbot+b42fe626038981fb7bfa@syzkaller.appspotmail.com
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
security/integrity/iint.c