From: Shuai Liu <847807867@qq.com>
To: linux-fsdevel@vger.kernel.org
Cc: viro@zeniv.linux.org.uk, neil@brown.name, brauner@kernel.org,
jack@suse.cz, linux-kernel@vger.kernel.org,
syzbot+2ed46b6b748df855347f@syzkaller.appspotmail.com,
Shuai Liu <847807867@qq.com>
Subject: Re: end_dirop() can unlock the i_rwsem of a re-parented dentry on PREEMPT_RT (DEBUG_LOCKS_WARN_ON in filename_symlinkat)
Date: Fri, 6 Nov 2026 14:47:00 +0800 [thread overview]
Message-ID: <tencent_29EE4AD2892C62F20E4D49B8626246134B08@qq.com> (raw)
In-Reply-To: <tencent_EE9EBC53933F6E9658D6848B7B89F4370B06@qq.com>
Hi Al, Neil, Christian, Jan,
Adding you to Cc on this -- my first mail in this thread only reached
the list address due to a sendmail mishap on my side.
In short: on PREEMPT_RT, syzbot reports DEBUG_LOCKS_WARN_ON
(rt_mutex_owner != current) from inode_unlock() called by end_dirop()
via filename_symlinkat -> end_creating_path() -> end_creating()
(syzbot dashboard: https://syzkaller.appspot.com/bug?extid=2ed46b6b748df855347f).
end_dirop() re-derives the directory to unlock from the current
de->d_parent, while start_dirop() locked the parent it was given
*before* the lookup. The warning therefore implies the dentry was
re-parented between the two.
I audited the candidates that could move a held dentry
(lookup_one_qstr_excl/d_lookup; d_splice_alias_ops() both branches --
IS_ROOT __d_move under rename_lock, and the __d_unalias path with its
s_vfs_rename_mutex + inode_trylock_shared()/-ESTALE fallback) and
could not construct an interleaving that re-parents the dirop dentry
while the exclusive parent lock is held. Runtime instrumentation at
both ends (owner check in end_dirop(), parent-identity check in
end_creating_path()) ran ~48k iterations of the C reproducer with
zero hits and zero false positives.
The full analysis and my questions (Q1: should start_dirop() capture
the locked inode explicitly for end_dirop() to unlock; Q2: which
d_move() callers do you suspect; Q3: could the divergence originate
at start time) are in my previous mail in this thread. I'd greatly
appreciate your insight, Neil especially given the start_dirop()/
end_dirop() rework.
Thanks,
Shuai Liu (刘帅)
next parent reply other threads:[~2026-11-06 6:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <tencent_EE9EBC53933F6E9658D6848B7B89F4370B06@qq.com>
2026-11-06 6:47 ` Shuai Liu [this message]
2026-11-09 9:04 ` NeilBrown
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=tencent_29EE4AD2892C62F20E4D49B8626246134B08@qq.com \
--to=847807867@qq.com \
--cc=brauner@kernel.org \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=neil@brown.name \
--cc=syzbot+2ed46b6b748df855347f@syzkaller.appspotmail.com \
--cc=viro@zeniv.linux.org.uk \
/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
all inboxes | Powered by JetHome®