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:07:12 +0000 (17:07 +0000)
commit2c63b9d7f7c8558fdfdd4bdb77c04f1cf8eab221
treecb902b22a06d5552f22805ec25e82fa6ebf26ab8
parentdb98de0809f12b0edb9cd1be78e1ec1bfeba8f40
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