From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795957510; b=rXJepqB5aoSCIR+Fp0eAjoQUlJj/43KrkgTr6xzalI6Z/inc5TkcBG5ebE5P0Nc/tIy7 i4u9X6jxzyVnq+KXsh5vPIiZjhXNBSymnx64QMuOx9+Jnteu7bTe4gcjQhYpCK3f9NhjZ owXLYU/7N4H7JGIEvb9LjuOoCTluL66NKBchEgilwIDtzJ/pBrfyPLG8V/ChBsBaL0o77 VrX9ECeSdaGPrelTf/6Zv8OmD0bO5A+9WNZ3EaPF1oeZEAQdg6uJMY4l1Oou4YWjLFz/L kWMoCYU/uJ74QZRySuh4Tj+4EWC6bg0D5ibM9Sqf9j/4mG8Y++hrE34eUjT1/knmbmA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795957510; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=PJY0kQ5/rQP6V7rmG871oc0V/nE1+hLaHOQmvQrMGAo=; b=NSDvNdcQHW7Cl4EAg7VnlA9Y5q1d59PqwlGsXRscjHpGgHoa0yKA6czFCtkvAzGsNntC yFVNkCK0LDnbyW/05CpAaExz4yuDzmN12mmtYi1hNTx6PpX+5HNOSXePwFflcz26aKzdF N4LI8KgXv9bOIrrr1i15pSmMK3W6m5V3kLO8P/eGnfMVivSCUo7mcDn9UKO5wCz7L0j42 27yMX+Pxd68dbaQGay1fXm/dVQkoo0TK6KhkDwR7GQIiJiB4p8CFq78B/uPN9KhC1LyW7 qzKtYax4ripfU3yLKXw4vfeYU+6K7bTI9FuIrJsFLzm0Ujl6EfDLv87zTA1bgW1374w== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=eC5AHJxY; arc=none 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 CBB52606A323 for ; Sun, 29 Nov 2026 13:05:10 +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=eC5AHJxY Received: by smtp.kernel.org (Postfix) with ESMTPSA id 59A7A1F000C1; Sun, 29 Nov 2026 13:05:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795957510; bh=PJY0kQ5/rQP6V7rmG871oc0V/nE1+hLaHOQmvQrMGAo=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=eC5AHJxYrBJnsXRWWT0LnnrNE5gyD+P6ckx7O1JiA/r9oVfdYAteOvUL7FIBjSek7 IibYJT1bGre4LHOlw93QIVNdbelCN9jwGNHQ2sJ2FLrpP7djuoxpm69MwiBjelpefV +6Sr9YL7qPna0t/xN0yuD1J/kCya2+FYPK205/J8SDxs4KDO+WNlh4onVsUx/SBUUa SQ+GgyEtitGEg1Wwh1LgtuGnOwNj1nypYfpg29kT/zDOdHOXMg2RmQ48c7ZP4lJNd6 /pj/mfeinlktbXM1LbASfZ7X6yK+cgKFgrVWc6SEJa69s6LtQRN+RQBTamYZ5W6Def ZZLKT8kGlblcA== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH RFC v3] configfs: don't lock the root inode in configfs_depend_item_unlocked() Reply-To: sashiko-reviews@lists.linux.dev To: "Haruka Amakawa" Cc: linux-usb@vger.kernel.org In-Reply-To: <20261129-configfs-depend-root-lock-v3-1-82417fbbaba0@pm.me> References: <20261129-configfs-depend-root-lock-v3-1-82417fbbaba0@pm.me> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Sun, 29 Nov 2026 13:05:09 +0000 X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list > From: Haruka Amakawa >=20 > 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. >=20 > 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 > Closes: https://lore.kernel.org/all/20261117150358.8149-1-founder@logarch= eon.com/ > Reported-by: syzbot+8c0a48f6c8357c9da819@syzkaller.appspotmail.com > Closes: https://syzkaller.appspot.com/bug?extid=3D8c0a48f6c8357c9da819 > Signed-off-by: Haruka Amakawa Sashiko has reviewed this patch and found no issues. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261129-configfs-d= epend-root-lock-v3-1-82417fbbaba0@pm.me?part=3D1