From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795956083; b=xQGvWhdAonCEifdeiW4KVDOtnvpXI6a/qdMb2MrcZ2HP0FEqDbqHDLcCfY04ZD0/Dgwq h6l36k6nXl2NduWZq9FgLliYLnhyAQxptCgEM9mopUcgaj+v2+o/z8cLwuaAgrTt4uXif P/WDS98gz8uj65z7jwzXTb19d6jJbZMeBK0LkgzkgnHpG8A74OSjXlQqWcCdF4JOVdOnQ YNOiS5PmQgL+gIeZqiWHH/0aWLjv/oixIlj1g6IjvQ21jzZyRtXET89DNqZLd/wNL1dbr BUZTfHm5WJAUMxTOV0ctSfeEIvQYAfP0CgYlNhyWBZ1LFDV7mHOp+2OUyRqpTRg6u6Q== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795956083; h=Received:DKIM-Signature:Received:From:Date:Subject:MIME-Version: Content-Type:Message-Id:X-B4-Tracking:X-Change-ID:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=nFfLZnqLsJkRWVXSbL7I6hnMGgg2ShQMR3ujrBOcJzU=; b=AEWlEgMM2UQi33PDQJJ3wggP+6Cxb4bDyJTmXfdsC6hpnzSv3eniVw1uOU3DLB3vnd1b ql8BkU3HyfMUEL1RqBaUe1R0WGO5mxJkNTGcUGJiqC8Wq4jeZrOSMZYoWYlWE5U6BWKwO mP0i86BnN7gfDks1LjG6vUsRKfK1iWANZBQrazBF3lU0gBa9vKhLB/Gk3VT5xgU6cebW8 g8K5rQfLIN/y5fVtfJWR7iMl0sGv/4CgmOmrrGkNU4pCKNuyoCS62pnG5OEhbh+gAMd4Y R/EWbURYZLWmQlsO7MfnRFrFEKtz0JURP7MgVvMsf+dyArIdWNsYmW3t2aCDSz+OXfQ== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=F4MwJXYs; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 83256606A31C; Sun, 29 Nov 2026 12:41:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=F4MwJXYs Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1795956082; b=b+PeuwJDh9axRGc33VMZQU57bD31EBYOGONHDroU3utT1H4FBTmC1ToU66Q1Wjl421zj ke7q+fLZlsC0N4rN7EJpC9NWkfEMUkJLhGbNjXPGz7eCkNG7BSq5vqyM+CAdUQ/AgKpM9 gVfR7vpXLg+VlUSZDpzw078E7FQc4Dj3ZGtvU1baOVVHqAegHHk1NwyfgSFi9aSqS82zA 1c5McYgvb7qbXd3w7ZEJvKwQZ9MP/J2eVrOkMp+GTRVqWsGCCUELWUWeh9iU653Ix6Ttb onGzR+ipB7NarwYKfZXE5uvXTe5grD3r9epQXX0kXTU2mMyl+ay5BIrp+waABHTJQ0g== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1795956082; h=DKIM-Signature:Received:From:Date:Subject:MIME-Version:Content-Type: Message-Id:X-B4-Tracking:X-Change-ID:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=nFfLZnqLsJkRWVXSbL7I6hnMGgg2ShQMR3ujrBOcJzU=; b=MvnD2C+QsyFt22wVaIDbIDtyscSBmoGwtSbOQQPcqoZeSDeYmZa5emyrB8YId3vbKbOV txscLLf/SmHazsKZa9lp7I1xS//9OwAmHWMmJ1KESa+zpbEO90qcnbWYesfhvJC2p1R2i PBxNmMwIHhpiucfnpP85Lq/OY7v3RjiZzqTFvDe5vU60bO42mzcxxpf/Ew3iBMLZFR6PA frPHSuEvfcm+/eR0z3LVMINwhN6j6E4l+AXozvdQRc9YAXZxDF9se6krhYVKB8R5H3ggE h96ohjYS/H1AQ5VkoaeQzW13Xs26CEZJaopldEovuVwAdkLdJ/ULzKUgoiDBpnFovkw== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id 524921F00897; Sun, 29 Nov 2026 12:41:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795956082; bh=nFfLZnqLsJkRWVXSbL7I6hnMGgg2ShQMR3ujrBOcJzU=; h=From:Date:Subject:To:Cc:Reply-To; b=F4MwJXYs9W0C+2pR0SreJjBdtSEMgtVcPXvEA08Q8fs+6MhjRCirsMma40r2FiA7P YiMp4Y6Cz8hc1gs309LTEfQiJ87b4kmba0cVHPQBFEi/M7k5AtU/LZbnpBA6h8lkwQ EMV8Splb+P/ZqWCQ/gLaYn9OksaxepEFghUOtcrA1hJnkfNXxbgkf6hKXclC2oRFT/ E1O8Oy7D6wGkh0vCOufisoKXalZsP0H71aC6t2qhns8AUi+qIc7jwnZZF0Drq0k3nm hGo02SyCeZkOH/INQcIbpk58HU8tSGjgB8EsFFswjwShkhm/Mi9/0XnZPSN6RIKv4z nnnXMlabmqIDg== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id A4BF74E485; Sun, 29 Nov 2026 12:41:10 +0000 (UTC) From: Haruka Amakawa via B4 Relay Date: Sun, 29 Nov 2026 21:38:55 +0900 Subject: [PATCH RFC v2] configfs: don't lock the root inode in configfs_depend_item_unlocked() X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Message-Id: <20261129-configfs-depend-root-lock-v2-1-8e7210fac4f3@pm.me> X-B4-Tracking: v=1; b=H4sIAAAAAAAC/42OTQ6CMBCFr0Jm7Rg7agFXJiYewK1hIe0UqtKSF omGcHcBL+Dye3l/A0QOliMckgEC9zZa7yagVQKqvrmK0eqJgTYkhaAclXfGViai5padxuB9h0+ vHriXWZlpaSRpA1O+DWzse+m+wuV8guInxld5Z9XNrbOttrHz4bM86MVi/mOsFygwJ70rZZrxN qVj26wbhmIcxy95Go0i1QAAAA== X-Change-ID: 20261129-configfs-depend-root-lock-568b8d6f62df To: Breno Leitao Cc: Greg Kroah-Hartman , Andreas Hindborg , Slawomir Stepien , William Chuang , Roy , linux-fsdevel@vger.kernel.org, linux-usb@vger.kernel.org, target-devel@vger.kernel.org, linux-kernel@vger.kernel.org, syzbot+8c0a48f6c8357c9da819@syzkaller.appspotmail.com, Haruka Amakawa X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1795955935; l=16173; i=macchacat@pm.me; s=arch214; h=from:subject:message-id; bh=hi5VXovSI3a3o51Fqo0kmUJPDnmxSuWuXrOxC3SYrA4=; b=iwfsvJmghcokb8SFrAndUL7qZsRSnfhyQgtj4QL+opFCLfnNYMJOSwBm9KK43Lb9jG58qkdFP jspwDlt3aDiAX1OxB8d0nrRl0waa2Pw3gosUan/2G9gf5p8YzUUz8Qn X-Developer-Key: i=macchacat@pm.me; a=ed25519; pk=r6NpNWPLq1yPUwtaO/MpNl2rZY3S0JrA2xPu9HXWuac= X-Endpoint-Received: by B4 Relay for macchacat@pm.me/arch214 with auth_id=1683 X-Original-From: Haruka Amakawa Reply-To: macchacat@pm.me Content-Transfer-Encoding: 7bit From: Haruka Amakawa 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 target/usb_gadget//tpgt_N: configfs_mkdir() calls the ->make_group() callback, target_fabric_make_tpg(), with the VFS still holding the directory lock, and its usbg_make_tpg() depends on the tcm function instance under usb_gadget/: mkdir(.../naa.X/tpgt_1) rename(".../config/a", ".../naa.X/a") inode_lock(naa.X) [VFS] lock_two_directories() inode_lock(root) inode_lock(naa.X) usbg_make_tpg() configfs_depend_item_unlocked() inode_lock(root) Sashiko pointed this inversion out in review, and William Chuang reproduced the hang: one process looping over mkdir/rmdir of tpgt_1 and another looping over rename() attempts like the one above (the source does not even exist) both hang within about a second. Giving the root inode its own lockdep class makes lockdep stop reporting the cycle, but the deadlock is still there. With that class split applied, the same two loops stop after the first mkdir of tpgt_1, lockdep reports nothing, and only the hung task detector notices: INFO: task rename_vs_mkdir:92 blocked for more than 30 seconds. down_write+0x1ae/0x1e0 configfs_depend_item_unlocked+0xd8/0x5c0 usbg_make_tpg+0x1f5/0x650 target_fabric_make_tpg+0xa6/0x7f0 configfs_mkdir+0x4ea/0xfe0 vfs_mkdir+0x2b7/0x920 INFO: task rename_vs_mkdir:93 blocked for more than 30 seconds. down_write_nested+0x1bd/0x1f0 lock_two_directories+0x186/0x330 __start_renaming+0xff/0x4e0 filename_renameat2+0x5bf/0x920 The root inode lock is not needed for what it protects here. Subsystem directories are added to and removed from the root's s_children under configfs_dirent_lock. A subsystem's dirent carries CONFIGFS_USET_CREATING until configfs_register_subsystem() has attached it, and configfs_unregister_subsystem() marks the subsystem's fragment dead before it takes the root inode lock, and later gives the dirent CONFIGFS_USET_DROPPING in configfs_detach_prep() under configfs_dirent_lock. So look the target subsystem up, check that it is neither being registered nor being unregistered, and take the dependency, all in one configfs_dirent_lock section, and don't take the root inode lock at all. The one s_type update of a subsystem dirent that was only covered by the root inode lock, setting CONFIGFS_USET_DIR in configfs_attach_group(), happens after the dirent is already on the root's s_children, so move it under configfs_dirent_lock too. frag_dead is now read without frag_sem here, so write it with WRITE_ONCE() in configfs_unregister_subsystem(). A depend that used to wait for a concurrent register of the target subsystem now fails with -ENOENT while the subsystem is not on the root's s_children yet or still marked CONFIGFS_USET_CREATING; once configfs_dir_set_ready() has cleared that, it goes on to the usual scan for the target. One that races with unregister fails with -ENOENT once it observes the fragment marked dead or the dirent marked CONFIGFS_USET_DROPPING. As before, unregister marks the fragment dead before it takes the root inode lock. configfs_unregister_subsystem() still does not look at s_dependent_count; that is unchanged. The same-subsystem case and configfs_depend_item() are unchanged. Claude Opus 5.5 (Claude Code) was used to analyse the problem and to write the code, this changelog and the test programs. The result was reviewed by me and cross-checked with GPT-6.2-Sol and Gemini 4 Carbon. Fixes: d79d75b5c518 ("fs: configfs: Add unlocked version of configfs_depend_item()") Reported-by: William Chuang 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 --- RFC because it changes how a cross-subsystem depend synchronizes with subsystem (un)registration, and because of the lockdep-class commit below. Breno: "configfs: give the root inode its own lockdep class" (https://patch.msgid.link/20261022134443.1122318-2-sst@poczta.fm) is queued in configfs-next. Its changelog says that no holder of the root inode lock waits for a directory inode lock held by a depend caller; for the rename path above, though, lock_two_directories() can hold the root inode lock while waiting for the descendant's inode lock, and with the class split applied lockdep no longer reports that hang. With this patch the root inode lock is no longer taken under a directory inode lock on this path, so the class split is not needed for it either. If this approach looks right, would you consider dropping the queued class split? I tested this patch both on configfs-next and on configfs-next with that commit reverted, with the same pass/fail results. Testing (QEMU/KVM via virtme-ng, x86_64, PROVE_LOCKING + KASAN + hung task detector at 30s). "Without the patch" is mainline 946d9ed1aa02 and next-20261127; "with" is configfs-next 2e0fad9d2eae plus this patch: - 60s loop of mkdir/rmdir of target/usb_gadget/naa.X/tpgt_1 against a loop of rename("/sys/kernel/config/nonexistent", ".../naa.X/nonexistent"): without the patch both loops stop (on mainline after 5 successful mkdirs, within the first second; on next-20261127 after the first one) and the hung task detector fires twice; with the patch, 5616 successful mkdirs and 17070 rename() calls (5328 and 21653 with the class split reverted), no lockdep, hung task or KASAN reports. rmdir of functions/tcm.usb0 still fails with -EBUSY while tpgt_1 exists, and succeeds after it is removed. - syzbot C reproducers for 8c0a48f6c8357c9da819 (uvc_func_allow_link) and 300213c2b5b55c0244f4 (uvcg_extension_bm_controls_store): lockdep report on mainline, none with the patch (also with the class commit reverted). I did not add tags for the latter, since usb-next already breaks that cycle on the UVC side with commit a3f3e1390f47 ("usb: gadget: uvc: remove su_mutex from configfs _show/_store callbacks", https://patch.msgid.link/20261119161742.758715-1-timo.joannin@gmail.com). - tools/testing/selftests/filesystems/configfs: 25/25. - Not tested: a depend racing with configfs_register_subsystem() or configfs_unregister_subsystem() of the target subsystem. Not in this patch, but found while looking at this: - configfs_depend_item() takes the root inode lock the same way, and at least vhost-scsi can call it with a mutex held that its ->make_group() takes under a directory inode lock: vhost_scsi_set_endpoint() holds vhost_scsi_mutex across target_depend_item(), and vhost_scsi_make_tpg() takes vhost_scsi_mutex on mkdir of target/vhost//tpgt_N with the directory locked. Together with an analogous rename() whose destination parent is target/vhost/, that looks like a three-task cycle. I have only checked this by reading the code, not reproduced it. If this approach is acceptable I can send the same change for configfs_depend_item() as a follow-up. - configfs_depend_item_unlocked() still walks target->ci_group up to the root without any lock, as before; and the comment in f_tcm's usbg_make_tpg() about the root inode lock becomes stale with this patch. --- Changes in v2: - Use my real name for the author and Signed-off-by, as Greg asked (no code changes). - Link to v1: https://patch.msgid.link/20261129-configfs-depend-root-lock-v1-1-92d4b678e372@pm.me --- fs/configfs/dir.c | 124 ++++++++++++++++++++++++++++++++---------------------- 1 file changed, 74 insertions(+), 50 deletions(-) diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c index c4f570686bd2..d9e08d5e02df 100644 --- a/fs/configfs/dir.c +++ b/fs/configfs/dir.c @@ -907,7 +907,9 @@ static int configfs_attach_group(struct config_item *item, ret = configfs_attach_item(item, dentry, frag); if (!ret) { sd = dentry->d_fsdata; + spin_lock(&configfs_dirent_lock); sd->s_type |= CONFIGFS_USET_DIR; + spin_unlock(&configfs_dirent_lock); /* * FYI, we're faking mkdir in populate_groups() @@ -1103,17 +1105,19 @@ static int configfs_depend_prep(struct configfs_dirent *sd, return ret; } -static int configfs_do_depend_item(struct configfs_dirent *subsys_sd, - struct config_item *target) +/* Caller must hold configfs_dirent_lock. */ +static int __configfs_do_depend_item(struct configfs_dirent *subsys_sd, + struct config_item *target) { struct configfs_dirent *p; int ret; - spin_lock(&configfs_dirent_lock); + lockdep_assert_held(&configfs_dirent_lock); + /* Scan the tree, return 0 if found */ ret = configfs_depend_prep(subsys_sd, target); if (ret) - goto out_unlock_dirent_lock; + return ret; /* * We are sure that the item is not about to be removed by rmdir(), and @@ -1122,27 +1126,46 @@ static int configfs_do_depend_item(struct configfs_dirent *subsys_sd, p = target->ci_dentry->d_fsdata; p->s_dependent_count += 1; -out_unlock_dirent_lock: + return 0; +} + +static int configfs_do_depend_item(struct configfs_dirent *subsys_sd, + struct config_item *target) +{ + int ret; + + spin_lock(&configfs_dirent_lock); + ret = __configfs_do_depend_item(subsys_sd, target); spin_unlock(&configfs_dirent_lock); return ret; } -static inline struct configfs_dirent * -configfs_find_subsys_dentry(struct configfs_dirent *root_sd, - struct config_item *subsys_item) +static struct configfs_dirent * +__configfs_find_subsys_dentry(struct configfs_dirent *root_sd, + struct config_item *subsys_item) { struct configfs_dirent *p; - struct configfs_dirent *ret = NULL; - spin_lock(&configfs_dirent_lock); + lockdep_assert_held(&configfs_dirent_lock); + list_for_each_entry(p, &root_sd->s_children, s_sibling) { if (p->s_type & CONFIGFS_DIR && - p->s_element == subsys_item) { - ret = p; - break; - } + p->s_element == subsys_item) + return p; } + + return NULL; +} + +static struct configfs_dirent * +configfs_find_subsys_dentry(struct configfs_dirent *root_sd, + struct config_item *subsys_item) +{ + struct configfs_dirent *ret; + + spin_lock(&configfs_dirent_lock); + ret = __configfs_find_subsys_dentry(root_sd, subsys_item); spin_unlock(&configfs_dirent_lock); return ret; @@ -1224,19 +1247,26 @@ EXPORT_SYMBOL(configfs_undepend_item); /* * caller_subsys is a caller's subsystem not target's. This is used to - * determine if we should lock root and check subsys or not. When we are - * in the same subsystem as our target there is no need to do locking as - * we know that subsys is valid and is not unregistered during this function - * as we are called from callback of one of his children and VFS holds a lock - * on some inode. Otherwise we have to lock our root to ensure that target's - * subsystem it is not unregistered during this function. + * determine if we have to check that the target's subsystem is still + * registered. When we are in the same subsystem as our target there is no + * need to, as we know that subsys is valid and is not unregistered during + * this function as we are called from callback of one of his children and + * VFS holds a lock on some inode. + * + * Otherwise the target's subsystem is looked up and the dependency is taken + * in one configfs_dirent_lock section, so the subsystem cannot be unlinked + * from the root in between. This must not take the root inode lock: the + * caller may be a directory operation callback such as ->make_group(), which + * runs with a directory inode locked by VFS, and a rename() between the root + * and a directory below it locks the root inode first (see + * lock_two_directories()), so that would be an ABBA deadlock. */ int configfs_depend_item_unlocked(struct configfs_subsystem *caller_subsys, struct config_item *target) { struct configfs_subsystem *target_subsys; + struct configfs_dirent *subsys_sd, *root_sd; struct config_group *root, *parent; - struct configfs_dirent *subsys_sd; int ret = -ENOENT; /* Disallow this function for configfs root */ @@ -1260,43 +1290,36 @@ int configfs_depend_item_unlocked(struct configfs_subsystem *caller_subsys, root = parent; } else { target_subsys = parent->cg_subsys; - /* Find a cofnigfs root as we may need it for locking */ + /* Find the configfs root to look the subsystem up from */ for (root = parent; !configfs_is_root(&root->cg_item); root = root->cg_item.ci_group) ; } - if (target_subsys != caller_subsys) { - /* - * We are in other configfs subsystem, so we have to do - * additional locking to prevent other subsystem from being - * unregistered - */ - inode_lock(d_inode(root->cg_item.ci_dentry)); - - /* - * As we are trying to depend item from other subsystem - * we have to check if this subsystem is still registered - */ - subsys_sd = configfs_find_subsys_dentry( - root->cg_item.ci_dentry->d_fsdata, - &target_subsys->su_group.cg_item); - if (!subsys_sd) - goto out_root_unlock; - } else { + if (target_subsys == caller_subsys) { subsys_sd = target_subsys->su_group.cg_item.ci_dentry->d_fsdata; + return configfs_do_depend_item(subsys_sd, target); } - /* Now we can execute core of depend item */ - ret = configfs_do_depend_item(subsys_sd, target); + /* + * The target is in another subsystem: check that it is still + * registered, and not being registered or unregistered, and take the + * dependency without dropping configfs_dirent_lock in between. + * configfs_unregister_subsystem() marks the subsystem's fragment dead + * before it takes the root inode lock, and the dirent + * CONFIGFS_USET_DROPPING later. + */ + root_sd = root->cg_item.ci_dentry->d_fsdata; - if (target_subsys != caller_subsys) -out_root_unlock: - /* - * We were called from subsystem other than our target so we - * took some locks so now it's time to release them - */ - inode_unlock(d_inode(root->cg_item.ci_dentry)); + spin_lock(&configfs_dirent_lock); + subsys_sd = __configfs_find_subsys_dentry(root_sd, + &target_subsys->su_group.cg_item); + if (subsys_sd && + !(subsys_sd->s_type & (CONFIGFS_USET_CREATING | + CONFIGFS_USET_DROPPING)) && + !READ_ONCE(subsys_sd->s_frag->frag_dead)) + ret = __configfs_do_depend_item(subsys_sd, target); + spin_unlock(&configfs_dirent_lock); return ret; } @@ -1963,7 +1986,8 @@ void configfs_unregister_subsystem(struct configfs_subsystem *subsys) } down_write(&frag->frag_sem); - frag->frag_dead = true; + /* Read locklessly by configfs_depend_item_unlocked() */ + WRITE_ONCE(frag->frag_dead, true); up_write(&frag->frag_sem); inode_lock_nested(d_inode(root), --- base-commit: 2e0fad9d2eaec7d4ce24ecb087d7f58ed9ad57e2 change-id: 20261129-configfs-depend-root-lock-568b8d6f62df Best regards, -- Haruka Amakawa