From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=185.171.202.116 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796378363; b=EA99nQd0OUzCIpf+3NhuNN+Hw/Q4dc9o+CtbLh2RuTnDhTCn4EvL4FsKdbx0ME/d6nMh ShFYPIz4D4cctgigt4kJSpLNruwqXXqB2qufBOnAz2P4HLEwJCsyWRZzoY6y5pouXJEyC WGkMPXHuVbN7c/9Yym7YFfmbpCTcqX4sBVvfffDGbakM4gnSY68/k0xJRMJvcKAU2ZzGr Gdp9dvbVV5Eaf1Kboq3Ro0xMfmWZoEdZ97IDIVeWUCfC38MUg0MriJR49DZDvbvcL0TyM +k14RGJovkvBdwWWfG7HTWCL6+l7syjYXvbok/4hnHQfdlk3p6BCc3kxPnYWu4WOXAQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796378363; h=DMARC-Filter:Received:Received:Received:DKIM-Signature:Message-ID: Date:MIME-Version:User-Agent:Subject:To:Cc:References:From: Content-Language:In-Reply-To:Content-Type:Content-Transfer-Encoding: X-Last-TLS-Session-Version; bh=304xX58fmQzt1EZs5taseo+sZo8xkKgD/qKzQ1AhYso=; b=3CmI4TjWM940R95oYHKZpOkNUP9m+8eTmminSOZpAGscRZCYBBLgP+ZNg1aZpfRcXsD1 I6Q4r/ikbphhuBZsQ9BBZzu5HabphVRrYYSvhp9/migTyIwvekFRRa6l/GkcTQRNhOpYg q7Dqt2aZcmqMkPhIVwE8uJMpto/5A91GqMaFMmupoR/bDjUsdJVJTGGeVlQ493D7iV2kS U5uJhe3t3gsZtcFYq3leVBPKb9QZ9XZBiB7k2roV1Lt/Snk11uoVn9VrpxJ6hnnehlrLV ZG5d0Su5xtgWUw6NltmTvMWzwE7GXE4GNGBPzFpGYJhNfZn/xHF/HaWjcPWL8zpozPw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=dkim header.b=kvQJ9z1P; arc=none smtp.remote-ip=185.171.202.116 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (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.subspace.kernel.org (Postfix) with ESMTPS id 7D740606A32C for ; Fri, 4 Dec 2026 09:59:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 7D740606A32C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=dkim header.b=kvQJ9z1P Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 131FAC026D7; Fri, 4 Dec 2026 09:59:32 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 29D75603C4; Fri, 4 Dec 2026 09:59:20 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id DF6A811EA187F; Fri, 04 Dec 2026 10:59:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1796378355; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:content-language:in-reply-to:references; bh=304xX58fmQzt1EZs5taseo+sZo8xkKgD/qKzQ1AhYso=; b=kvQJ9z1PNUPqUIwCmv1CvfcVUF+/Uz+iTRgIja8s9ZAbuh0n9RR/HeY/SqOkszB7EzZCy6 cSn1sTsCRScqWygvlRBGQY++GQHI3hyh29OS+wSSXayYESebJuGSsCkToTY/JMnEj2KOFM CMHuVzlqYHqjJ2JO9jOd1zaUHytF82H39i3YmeD3aS7Kx52VsJbfJ6DJkMHUF+sS0KcL9t s5nIMYWT93aaqP/cADHSfY0Q2GeCtic42LES9HK+rSrD7Cle7dVmVX84PRf6yezhEmkGtw mQtHObUrlmCarzSXOkt2jqfe9hj5gKS7BKJB4AtQbYkuokGLuUl/moDnqa8Srw== Message-ID: Date: Fri, 4 Dec 2026 10:59:07 +0100 X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Betterbird (Linux) Subject: Re: [PATCH net] ethtool: tsinfo: avoid holding a netdev reference across dumps To: Zhao Gongyi , netdev@vger.kernel.org, Andrew Lunn , Jakub Kicinski Cc: "David S . Miller" , Eric Dumazet , Paolo Abeni , Willem de Bruijn , Simon Horman , Hui Peng , stable@vger.kernel.org References: <20261130101120.71070-1-zhaogongyi@bytedance.com> From: Kory Maincent Content-Language: en-US In-Reply-To: <20261130101120.71070-1-zhaogongyi@bytedance.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Last-TLS-Session-Version: TLSv1.3 On 11/30/26 11:11, Zhao Gongyi wrote: > A syzkaller workload issuing filtered TSINFO dumps reproduced a device > unregister stall on arm64. A reduced six-call syzkaller program also > reproduced the stall. With CONFIG_NET_DEV_REFCNT_TRACKER enabled, the > remaining tracked reference was attributed to ethnl_tsinfo_start(): > > unregister_netdevice: waiting for syz_tun to become free. Usage count = 2 > ref_tracker: netdev@0000000068a552dd has 1/1 users at > netdev_get_by_index+0x54/0x98 > ethnl_parse_header_dev_get+0xb0/0x2d4 > ethnl_tsinfo_start+0x7c/0x164 > genl_start+0x124/0x1a8 > __netlink_dump_start+0x17c/0x2bc > > Filtered dumps retain this reference from .start() until .done(), making > device removal depend on dump completion or socket teardown. This does > not require a multi-skb reply: the initial netlink_dump() can fail its > allocation or receive-buffer checks before calling .dumpit(), leaving > the dump active for a later recvmsg() or socket release. > > Save the requested ifindex and release the parsed reference in .start(). > Look up the device under the ops compat lock for each dump callback, > validating registration and namespace state before accessing it. Return > -ENODEV if the device is no longer available. > > On the older arm64 test kernel, replays of the reduced syzkaller > program with this fix reported no crash in a 30-second run and a > six-minute run. Reviewed-by: Kory Maincent Thank you! -- Köry Maincent, Bootlin Embedded Linux and kernel engineering https://bootlin.com