From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=185.246.85.4 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796378363; b=TYSw6wBf591tg4GBa86dvkSZ7IFXRZAj9VAkK+DppPLAYaxv0pgygkcUVBwG/VqEOWDi e5H0k9G9TH2iRCDi8pdpmP1WeG6hkGHdSytCSb+ytRv7CKC4eaA0E+xpsQmxExRuQF2bY xEu6cMdEE1mRI5w0azjpgq+1EdOESalgGkbNf4ayghCmJ8X2YtmQsMGtEH0hio0+DmWsk DkF0nTl7n6rfxlRSPk4/LuTSiW/rTIi5JmXjR440YlQ1Y7eO1emiUPQ9tQUppIWNezkNI aHu5dWvohhqBy3R6lpOHroOmkAB7P/7Mi4CcVIFiPG47Qgb48pIs5Zx1uJSS1sF2dzw== 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=Q2izFaiIjQB2H7iDsSF9YoTXwFMa9B8XaatlubKCR/gJeDcmBI2d/Wc8X5xgcNz5wrH0 J+af/uBBMKe19EIRbWUxUts1R2AmSSS0AFZkDFV7MZ8sKqUASmnPbmo5iBExknTiSLXyX D/+mVHucz7I1bR1+Q9OvK+abv0nWxlHq5Q9ezugrBO7O2FdpXPX99EVMNva5DidWpjipW /gg02gWvk+BiB4cnbTCaoELN3R5Xoa0u2Iy4fxkKPrbf7soqKvNrZOXqcn5RvQsuq5bVq to/AK3GiHunGtgbMrwmHufGh8ylXtp5yL6rd5Ie/zOQW3HcGlVO807khTuu3CivrXtQ== 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.246.85.4 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (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 54765606A333 for ; Fri, 4 Dec 2026 09:59:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 54765606A333 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-03.galae.net (Postfix) with ESMTPS id 748254E41885; Fri, 4 Dec 2026 09:59:20 +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: stable@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