From: sashiko-bot@kernel.org
To: "Haruka Amakawa" <macchacat@pm.me>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH RFC v3] configfs: don't lock the root inode in configfs_depend_item_unlocked()
Date: Sun, 29 Nov 2026 13:05:09 +0000 [thread overview]
Message-ID: <sashiko-outbox-239620@kernel.org> (raw)
In-Reply-To: <20261129-configfs-depend-root-lock-v3-1-82417fbbaba0@pm.me>
> From: Haruka Amakawa <macchacat@pm.me>
>
> configfs_depend_item_unlocked() is meant to be called from configfs
> callbacks. Directory operation callbacks such as ->make_group() run
> with a directory inode locked by the VFS. When the target item lives in
> another subsystem, configfs_depend_item_unlocked() additionally locks
> the configfs root inode, so that the target subsystem cannot be
> unregistered while it is looked up and the dependency is taken.
>
> From such a callback, that nests the root inode lock inside a directory
> inode lock. A rename() whose two parent directories are the configfs
> root and a directory below it nests them the other way round:
> lock_rename() locks both parents before the last components are looked
> up and before vfs_rename() gets to fail, and lock_two_directories()
> locks the ancestor first. f_tcm runs into this on mkdir of
> [ ... ]
> Reported-by: William Chuang <founder@logarcheon.com>
> Closes: https://lore.kernel.org/all/20261117150358.8149-1-founder@logarcheon.com/
> Reported-by: syzbot+8c0a48f6c8357c9da819@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=8c0a48f6c8357c9da819
> Signed-off-by: Haruka Amakawa <macchacat@pm.me>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261129-configfs-depend-root-lock-v3-1-82417fbbaba0@pm.me?part=1
next prev parent reply other threads:[~2026-11-29 13:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-29 12:56 [PATCH RFC v3] configfs: don't lock the root inode in configfs_depend_item_unlocked() Haruka Amakawa
2026-11-29 12:56 ` Haruka Amakawa via B4 Relay
2026-11-29 13:05 ` sashiko-bot [this message]
2026-11-29 13:18 ` Greg Kroah-Hartman
2026-11-29 13:23 ` Haruka Amakawa
2026-11-30 9:34 ` Lin Tzu Yang
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-239620@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=macchacat@pm.me \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.