From: sashiko-bot@kernel.org
Cc: linux-security-module@vger.kernel.org
Subject: Re: [PATCH] ima: key iint mutex lockdep class per filesystem type
Date: Mon, 23 Nov 2026 11:20:44 +0000 [thread overview]
Message-ID: <sashiko-outbox-229106@kernel.org> (raw)
In-Reply-To: <20261123111452.237422-1-ngocthang2710.1999@gmail.com>
> syzbot reports a circular locking dependency between the iint mutex,
> a 9p inode's i_rwsem and the sb_writers of the cachefiles backing fs:
>
> sb_writers#12 --> &ima_iint_mutex_key[depth] --> &sb->s_type->i_mutex_key#25
>
> The three edges are:
>
> backing fs O_TRUNC open: sb_writers(backing) -> iint(backing inode)
> 9p open + IMA hash: iint(9p inode) -> i_rwsem(9p inode)
> 9p truncate/writeback: i_rwsem(9p inode) -> sb_writers(backing)
>
> The last one is inherent to netfs: it writes to its cachefiles backing
> file under its own inode lock. The cycle only closes because the iint
> mutex is keyed by s_stack_depth alone, so the 9p and backing fs iints,
> both at depth 0, share one lockdep class. They are different inodes
> and nothing waits on a netfs iint while holding the backing fs's
> sb_writers, so this is a false positive.
>
> Key the iint mutex per filesystem type as well as depth, as is done for
> i_rwsem with s_type->i_mutex_key. The overlayfs case covered by the
> depth annotation is unchanged.
>
> Fixes: e044374a8a0a ("ima: annotate iint mutex to avoid lockdep false positive warnings")
> Reported-by: syzbot+deb8af81d91415fabac1@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=deb8af81d91415fabac1
> Signed-off-by: Nguyen Ngoc Thang <ngocthang2710.1999@gmail.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261123111452.237422-1-ngocthang2710.1999@gmail.com?part=1
prev parent reply other threads:[~2026-11-23 11:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 11:14 [PATCH] ima: key iint mutex lockdep class per filesystem type Nguyen Ngoc Thang
2026-11-23 11:20 ` sashiko-bot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-229106@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox