From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=172.234.252.31 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793717326; b=n022OzIktz7NkhSfV5LpAlH3xHvhTa/5vK+fEZlteKppmRdxH/u1Vc6tEK2Gb2drJkJN sv9ZGv5KMBgJJwah3rzVQ7TodjHK7GP6CSOVbgEbaXbzrWIoiuotAS+gSt2eoPsfh2Isq k4WLAvMPZjqCRIO7CMQY+vIC5nezy+ODd1xY/qGv2GUbTx70xhpLhEoeKsc7nM4fdKB4f tc1NlnYygi9cRKUGj4JKLrPMkOtWPXgPU4ZuJmuhmDlekGNqtVwr5b4OXt9i54NxMeUNa K+n9J18BiN+KpqI7QagSVgXy6QTJdASg564MJJBu+5cLa4H9PgNWDPtqeqlSNfdtE5w== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793717326; h=DMARC-Filter:Received:Received:DKIM-Signature:Message-ID:From: Subject:Reply-To:To:Cc:In-Reply-To:References:Content-Type: Content-Transfer-Encoding:Date; bh=uDobM7QDj3Lx8HNQ5416tX3+kK/o8mWee2ZveIT1ntg=; b=AdXV9g9pBt8ihd+9q8N/But24A8eTWLx3J9/1JWKfLTVKbSr4GjPfADEIR1KLKwlXnsu gDRDqrYEai/AeqfMXnZonR1mX5ib0Fh/L2dANMmc469xm6RNl9hjJDL1UX6oLWlbbyHkY xBOamjl2fXdTX/S9yorlXYJxP6+nj9NkA8Xpr2jDSHFjKBhVv083KfJ/2DHj6fjFJvGRX 1vjGNcKntVYWtpU0KbIZ1Xm4wAyN8snvrw2HPwo9p1indQIYGcohjCrT01PT6WJKTW9vd SgKsDW0c9TDmxru55gP2boUtjORifYO7KbF3vhM4yDwZ48AK/OiTCz/7K0lF78sq0Jg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=kernel.org; spf=pass smtp.mailfrom=kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Na2gJC3W; arc=none smtp.remote-ip=172.234.252.31 Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) (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 A1F14606D2D8 for ; Tue, 3 Nov 2026 14:48:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org A1F14606D2D8 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kernel.org 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=Na2gJC3W Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 72F3D43A6C; Tue, 3 Nov 2026 14:48:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D04C41F0093A; Tue, 3 Nov 2026 14:48:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1793717325; bh=uDobM7QDj3Lx8HNQ5416tX3+kK/o8mWee2ZveIT1ntg=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=Na2gJC3Wod/GFK0uuWDrP4WIt6zGBZoiUHvOVc1vbCqA8NZv6QU85/+Q18TJpfTPa OJyuC1FeqkvW+ARL6u4FjlMjgYVIUzvttMG/Jn3lctETTJNvH2e8k++EUQDqc8cjrS PlTncNci7sIK/n/L4Y1wcClXJ9V68jHW625sylwdyxVH/+hgk0OEcay/SXkoUlSOwu 8SxZBhWuURiqG/KXhBCSlYOyUIyG1nMmMczEAHHWOqwIb4KOnr73DHH3TA1dIdrVfb 60ZV6surnMaQ4iePDAqdVVlUfTU/XYdZsd5WE2XJyN0J6fosbfAg1RZcuBrpBpR6nt rbyu0Csf5ldgg== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH RFC 37/38] proc: don't pin a symlink's entry while readlink() copies it out Reply-To: sashiko-reviews@lists.linux.dev To: "Christian Brauner" Cc: "Linus Torvalds" , "Jann Horn" , "Josef Bacik" , "Chris Mason" , "Jeff Layton" , NeilBrown , "Eric Dumazet" , "Thomas Gleixner" , "Al Viro" , "Jonathan Corbet" , "Christoph Hellwig" , "Greg Kroah-Hartman" , "Joel Granados" , "Kees Cook" , "Jan Kara" , "Jan Kara" , linux-s390@vger.kernel.org, coreteam@netfilter.org, kexec@lists.infradead.org, linux-pci@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-usb@vger.kernel.org, samba-technical@lists.samba.org, linux-m68k@lists.linux-m68k.org, linux-serial@vger.kernel.org, "Takashi Iwai" , linux-ext4@vger.kernel.org, "Chuck Lever" , tytso@mit.edu, "Heiko Carstens" , "Vasily Gorbik" , "Alexander Gordeev" , "Christian Borntraeger" In-Reply-To: <20261102-work-procfs-bugfixes-v1-37-59422ed3e465@kernel.org> References: <20261102-work-procfs-bugfixes-v1-0-59422ed3e465@kernel.org> <20261102-work-procfs-bugfixes-v1-37-59422ed3e465@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Tue, 03 Nov 2026 14:48:43 +0000 X-Mailing-List: linux-m68k@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list > proc_get_link() pins the entry with use_pde() and the delayed call > unpins it. vfs_readlink() copies the link to userspace in between. So a > page fault in that copy holds up remove_proc_entry() just like the > copies of reads and writes do, and the callers hold locks while they > wait. /proc/asound/ is removed with snd_card_mutex and info_mutex > held when a card changes its id. >=20 > The pin doesn't keep anything alive. proc_symlink() copies the target > and pde_free() frees it with the entry, and the inode holds a reference > to the entry. What the pin does is keep a removed symlink from being > followed. So check ->in_use instead and drop the delayed call. That > also takes an atomic pair off every traversal of /proc/net and > /proc/mounts. >=20 > Fixes: 7e0e953bb0cf ("procfs: fix race between symlink removals and trave= rsals") > Cc: stable@vger.kernel.org > Signed-off-by: Christian Brauner (Amutable) Sashiko has reviewed this patch and found no issues. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261102-work-procf= s-bugfixes-v1-0-59422ed3e465@kernel.org?part=3D37