From: Al Viro <viro@zeniv.linux.org.uk>
To: syzbot <syzbot+169de184e9defe7fe709@syzkaller.appspotmail.com>
Cc: linux-kernel@vger.kernel.org, lizhi.xu@windriver.com
Subject: Re: [syzbot] Re: [syzbot] [nfs?] [net?] possible deadlock in rpc_close_pipes
Date: Thu, 3 Jul 2025 03:27:04 +0100 [thread overview]
Message-ID: <20250703022704.GI1880847@ZenIV> (raw)
In-Reply-To: <20250703015033.GH1880847@ZenIV>
On Thu, Jul 03, 2025 at 02:50:33AM +0100, Al Viro wrote:
> As for the warning, it is a false positive caused by lockdep annotations, as
> the original report suggested. Replace inode_lock(inode) in rpc_close_pipes()
> with inode_lock_nested(inode, I_MUTEX_CHILD) and try to reproduce that.
Nope... I_MUTEX_CHILD is outside of I_MUTEX_NORMAL, not the other way round.
OK, so the right annotations would be I_MUTEX_CHILD in __simple_recursive_removal(),
with I_MUTEX_NORMAL in rpc_close_pipes() and, for callers of locked_recursive_removal(),
I_MUTEX_PARENT.
The nesting order is PARENT, then CHILD, then NORMAL. Sure, we could leave
annotations in simple_recursive_removal() as-is and switch rpc_close_pipes() to
e.g. I_MUTEX_XATTR, but that's too brittle for words.
The ordering is "ancestors before descendents", and it is satisfied here; the
question is how to map it to lockdep classes ;-/
next prev parent reply other threads:[~2025-07-03 2:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-02 17:41 [syzbot] [nfs?] [net?] possible deadlock in rpc_close_pipes syzbot
2025-07-03 1:17 ` [syzbot] " syzbot
2025-07-03 1:50 ` Al Viro
2025-07-03 2:27 ` Al Viro [this message]
2025-07-03 1:40 ` Hillf Danton
2025-07-03 8:58 ` syzbot
2025-07-03 2:47 ` [syzbot] " syzbot
2025-07-03 2:59 ` Al Viro
2025-07-03 9:38 ` syzbot
2025-07-03 9:22 ` [syzbot] " syzbot
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=20250703022704.GI1880847@ZenIV \
--to=viro@zeniv.linux.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=lizhi.xu@windriver.com \
--cc=syzbot+169de184e9defe7fe709@syzkaller.appspotmail.com \
/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