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=1795914629; b=gyuNIa1oB42TOG1iRY4HUUmObnZcw83HUPqMs7PIAEhpQxGyJbzRU91bryZPl5Tt2v2e XfK0o77mFLLYsr6fCfztpV5WE47inhT5m9estjH5d1E/M/hD7vV1PzuofevrjkeUopD+Y Tq5RkvuFBcRwrwkCP/W9epMFmCDrhvrFs+NIteGJU2fyZ/eHP0ygIq+AEtATfwSNSiTU1 /8Ms6dePFZGm/7YU/NPx/34KIXW2CL1iTaTpAAZzGkO6EM4EkoM9JlDBi1x7stWTNnryQ 1YEKei+QRNY0YDUL4gcS7RXV274OFET+zx8GU1zm3rAeHpzCeqORucD9QILcnofSiBg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795914629; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=ALIMGmiWnlKhVaTSIv/hZbpJ3lG2a3RHl3KIyL4M68E=; b=tin6+kd5C2elfkAD0G3qby3+GEttQwVixCTRD/Z0pMB0/1xvAq4l6smrAmBc/6UYPk/z DNJ62QUtsNAz7eNHq3HQOf9cm4hpcLNQ4K7beuhgWxW+Bz01iKIgpFJ2UlJ2dnZTzAcD7 4s703FcyiVSHumNv79JrI8izApsaDesWUIaS0wEH60WU+yAZCsR+Fn46ILdseT8SQH2hJ ZzI9MFcX/s+iWfJGI2xKCX69MEnVT9noN7ARdWhPsx8D8Q1ky9jo+81MY+YWtI1ETLXtf gEho7mZDm/MO8AFQ7zJ9WH54vLgwhXlcjJnm0A4O8EX1n00SYOcSuWx6pjyuHIr7SxA== 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=jXahz1Mb; 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 9A6BE606A31C for ; Sun, 29 Nov 2026 01:10:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=jXahz1Mb Received: by smtp.kernel.org (Postfix) with ESMTPSA id 17E0B1F000C1; Sun, 29 Nov 2026 01:10:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795914629; bh=ALIMGmiWnlKhVaTSIv/hZbpJ3lG2a3RHl3KIyL4M68E=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=jXahz1MbRoi3QSsaRPHDEVz9yq0wPV69B7ufdePAJnisl0bWYqAFkbE24PXLEiqLf FrcDbHp7mSnjthvUAFWyOIL7OjQheiN9DCAarnRceybe8iLZnWFuO9WFlizS8utOKX MKiK2iEDUHhkwT5CmrDKWr8nAJFt+0tM51FyL1eb2tQB2FiJKCZ1IO+Lg3xeo2zq0i Ib6AjO8aAxnSI1D6ezdYiZ266ZUDxyKcnBOXj6g3/Wm1sOXzJEuCzmH7cL/uM0M7oR hKm0NmmR7qObm+KTO+G4lEHpH1O9t2RrDtVfpPQgVzB96pCJl3tgSJauB6C9VLG6UH OFXu4jEWbk+GA== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH RFC] configfs: don't lock the root inode in configfs_depend_item_unlocked() Reply-To: sashiko-reviews@lists.linux.dev To: MacchaCat Cc: linux-usb@vger.kernel.org In-Reply-To: <20261129-configfs-depend-root-lock-v1-1-92d4b678e372@pm.me> References: <20261129-configfs-depend-root-lock-v1-1-92d4b678e372@pm.me> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Sun, 29 Nov 2026 01:10:28 +0000 X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list > From: MacchaCat >=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: MacchaCat 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-v1-1-92d4b678e372@pm.me?part=3D1