Article View: linux.kernel.netdev
Article #10394Re: [PATCH] net: dsa: loop: release netdev reference on registration failure
From: Andrew Lunn
Date: Tue, 03 Nov 2026 13:36
Date: Tue, 03 Nov 2026 13:36
21 lines
8786 bytes
8786 bytes
On Tue, Nov 03, 2026 at 10:05:29AM +0000, Wentao Liang wrote:
> dsa_loop_drv_probe() takes a reference on the CPU net_device with
> dev_get_by_name() before calling dsa_register_switch(). The matching
> dev_put() is only done in dsa_loop_drv_remove(), which the driver core
> does not call after a failed probe, so every failed registration leaks
> the reference.
Please read:
https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html
You must indicate which tree this is for.
And please think carefully about which tree you pick. Does the issue
actually bother anybody?
Andrew
---
pw-bot: cr
Technical Details
Message-ID:
<2bea0e6e-5bff-4a3d-aeb7-5b199924fb3b@lunn.ch>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-355648-linux-kernel-netdev=dewy.ruReferences:
<20261103100529.1309887-1-vulab@iscas.ac.cn>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-355648-linux-kernel-netdev=dewy.ru From: andrew@lunn.ch (Andrew Lunn) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH] net: dsa: loop: release netdev reference on registration failure Date: Tue, 3 Nov 2026 14:36:12 +0100 Organization: Usenet Network Message-ID: <2bea0e6e-5bff-4a3d-aeb7-5b199924fb3b@lunn.ch> References: <20261103100529.1309887-1-vulab@iscas.ac.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: usenet.network; logging-data="3178407"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:vrC/+tTmmFE16B49SMhMERMJ0cA= sha256:vNB6fuhkmq8I3+sI5n0DM1X+TXBtqy/SasCU+/uVkpg= sha1:wB++N4fEl7epgM9vR8TrOQLeMmo= sha256:If+yT/Zs2n3CasA9bhecd5SnQQxhYetdMZtgM8YRTJs= Content-Disposition: inline List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id DBD1F1128BA; Tue, 3 Nov 2026 16:49:17 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.151 X-Spam-Status: No, score=-3.151 tagged_above=-9999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key) header.d=lunn.ch X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8c-T_LxSfUjv; Tue, 3 Nov 2026 16:49:14 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-355648-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=lunn.ch X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74]) by mail.dewy.ru (Postfix) with ESMTPS id 24AE01128B3; Tue, 3 Nov 2026 16:49:05 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sto.lore.kernel.org (Postfix) with ESMTP id BE90C6102EC; Tue, 3 Nov 2026 13:37:57 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1793712982; b=rIAuyQ8TTnTjGXeFHoTFxmtEwcWPUS7+DnAmkYOsN8r7MRN6bDUF117w56GnGoINsWaj pTfA09HmeCtQn/qXWKKvsI81axKIPNk9QIEP2BNmuEchhRspTEzjuMRowejWtev1M3aXU LVebaUEG8eBUHMRxXIj4Z8Ce3+uTb12IkBfDrzX6E3lNu0H6nuD45xa4OC52kWAKEsVCp wa09EQ6SJAunKKS31eqhX9WbzUiglKg0XanpyrZLPHMqFOPMmp96jjCLo668vOniCQICN cWG5GldXMgUmsex864a1cufmAKo+BDPULi4Nv6Ot2ZNHiQ9u3hdHPlEkx3qr7JBYdjA== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793712982; h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:Date: From:To:Cc:Subject:Message-ID:References:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=p8pRKIIdkCJcS0p/9hJ1x1TDgrprRrlCDBxylB1bYH8=; b=t6IVklmypjIn+V41ROz19UDpR7HjeY3MbIC4EFsD4aeuJpxPoaQHgIJS3ojNhJl0diTm f1qj5ubKOHp8tX5/WhF19iWb/9l0o4JlV0Uwg3F/uadtF9OulWADkSSRQ8oWP8SaJU3Pw gfil7rr6NcMRO+NpWeibC4WZjrQhBoAvREg7Wv+mYzhFxdbYbKcFpoH+0DNblOkSjqZ9x AjfubLuzFCsSvvU7f4t7CVXogxEKJENnwZnSCSL3sLOK+Ru8eX2Uu0hDP6ia6RB4b2wMX eR5lhYFyrGQZeX4SlD6/rxQ1TVDhywGL0kGtNhlPJwLItb6Wd53+2AY4QPhHUAkculQ== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=KA6tWNOm; dmarc=pass header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6EA6F606D826; Tue, 3 Nov 2026 13:36:22 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=KA6tWNOm X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=156.67.10.101 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793712981; b=4WzJRN5Bz33fyREks+YmXoElalcEUCBVkSZEY0aHHH9O2heQacEFU2Ehjumi2lkLsMSC eRh+XLEcZQaL/AWt4lB/ZfCsFeJ/ysoZcWzI3hk5BKUDGh6BVaOj8u5wd8ONuEPvVwFUB XqIyXodqgmAOTeZ8GqGGwb/RqZ4uEneJY9RskFm8yWXMpFTpvzjpQ2ovKfkt8uFDKmVzi 4FD0eNckqmZ/O8CeMjcvrwyUXp7x28DK7jOBzMF+h9LJ2gEVyHXhqhwXEGy1OBPc4XqgX 2VDXm1MdObQwI2puJVv7YlybxLcn/aqXarX8Xmu9p/aM3wiNRCjMvPj5bqct+xDjZnQ== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793712981; h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject: Message-ID:References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To; bh=p8pRKIIdkCJcS0p/9hJ1x1TDgrprRrlCDBxylB1bYH8=; b=zF5R4w2iLcM/BachA12tUkppSmyJn11B5NkPTa2aoYshqI5xbdhLXh1D8gZBMGHqxJo2 6hbQnVUNjRtlYvUTGoe7l9XBblpREU+4xPMeuEnEa0jhVSl0IhvA2rHpxbMh6cFafMPAS soTLWtINQCuBI6XOPvqzumUxHWN2Wo1H5jHP87OCydA4PBxQgpDCeXkSV7qQguoDgIZwz 5ihS2FjAFCmkO+ye9KBXwQRPQF80mNa9cvm7gDdY2oEETZvnHACrBtCngJ4rOySSxRIUX xvBlgVLxhzQrt9ncklliRggBaLo90H4ZfW2YQygcptiw/vVlyCZx416cWjfQ3ry1Osw== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=KA6tWNOm; arc=none smtp.remote-ip=156.67.10.101 X-Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 19C7A606A332; Tue, 3 Nov 2026 13:36:20 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 19C7A606A332 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch X-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=p8pRKIIdkCJcS0p/9hJ1x1TDgrprRrlCDBxylB1bYH8=; b=KA6tWNOmwewtOpgEmq8Kqtospd KFJSyP3k1zNCZiDKEIebNDAhxpEUdI2rQdxPxhg1KK8Afd4KOK0GQ2STo/w4IXXfmiNGohdE67eXq C6RMhAWq8tuWdhiAHpeZ/EY9iBKJt7fy27ujmeftgqJZ1eST1ATYgglqaDzlnj5w6bbU=; X-Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from <andrew@lunn.ch>) id 1xOEgO-00E44o-If; Tue, 03 Nov 2026 14:36:12 +0100 X-Cc: Vladimir Oltean <olteanv@gmail.com>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@kernel.org>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-In-Reply-To: <20261103100529.1309887-1-vulab@iscas.ac.cn>