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=1795956495; b=2kt3rWV+fjzhLShpFHsp59W/JfdDd4sqxC5LpitXj3w4NL67RkXaZI01ujqk8CHTdYl0 JRXJBdEj3mWuxUy7+Ib6xAi+USoEEk66OusKTulGU8XzjLMlOsZOd4m+EFn/mXve0LRWh OWRfOjyWGDsa5hgV6Exxy8t0PmmkXUiwKo4nhqIEKO4RFhCT6HGfZhM9mRNh33S2JiMb9 XBSlygGAxydCtzAOhWcvPE1j+YByDTuw9P5njVzDcidWdSf8yeYX7qU5YOWu3GRQ6NjVY c1/CybwGRh8ax/IIJYe02MmKOrU3W4qbfvhKXZxBuOqokHbQIDKnaIH5iVQnCrrTl8w== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795956495; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=7HAVbwC73RpS4f7hb6/bPRP4oWjsl0RFz6emTTCATT0=; b=BbOyAGJ73ZqaaLNCraSkM5raBBDZ5frKZr+lOHRgvZ2v1RPe/ECVEHxL+ixB/1iRlHSd Yp+6mTzUxPQWjBjUH+4I1s2E6purfiszdHRmlETo7EfIdqBze2aAbrFCfYPcCicDYYjBs /BexLkFXWpE7NcgeMPrlpcpSpEC29ZmpTNWtn306Xs7i96Y4Ez/fjS6/oxYKIwpIKLq7O KJPbfYbs4ZuOlNqr7Ga2EicwE3Mv1I3DZ8CGrJd0Dsw19liMqS/XJS2Iak9jKowdkP9xX x+J9eYZoNJlTHJ68Gnw+IGtEAFgkgP59LcwVCVaonwdcEj2gKPNNmItUTcNKiZhrRKA== 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=Akur5znD; 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 97388606A31C for ; Sun, 29 Nov 2026 12:48:15 +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=Akur5znD Received: by smtp.kernel.org (Postfix) with ESMTPSA id 19D9A1F000C1; Sun, 29 Nov 2026 12:48:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795956495; bh=7HAVbwC73RpS4f7hb6/bPRP4oWjsl0RFz6emTTCATT0=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=Akur5znD+88zDW3hb6l2ReWGLYsnn9QS6dKp8jI0g2SMLTfZkDyYH6yRloDd7z02u XwKv5RpXVzSKLT/Gjk8qu2MQSbXfMlqsU04nNAh6sCpUr7JV/NpRDDD4dsBtaNWLO4 6ebOCeGtaqU+A7aT3KzN6flShofeUUPQfa0XJ7cycYUCdm8j8Z5MUSjFVLfgGR9E3d mNjD1BzgPXiGxu2rQT/Epg9dlMzMBNh3eiIWQpQ762JJyNdoKUBON+CMtcR7N6JeFc XgJ7YBmmZQP+vjVZ0KXuzTR92k/UWlX9rLScWPv5koiLN7g1dYiOLswWSIHkWhE60x Raa0yzoS3MM0A== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH RFC v2] 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-v2-1-8e7210fac4f3@pm.me> References: <20261129-configfs-depend-root-lock-v2-1-8e7210fac4f3@pm.me> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Sun, 29 Nov 2026 12:48:14 +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-v2-1-8e7210fac4f3@pm.me?part=3D1