Article View: linux.kernel.netdev
Article #21502Re: [PATCH 6.6.y] net: free_netdev: exit earlier if dummy
From: Dust Li
Date: Tue, 24 Nov 2026 04:13
Date: Tue, 24 Nov 2026 04:13
42 lines
10139 bytes
10139 bytes
On 2026-11-23 08:26:37, Greg Kroah-Hartman wrote: >On Sun, Nov 08, 2026 at 12:14:15AM +0800, Dust Li wrote: >> From: Breno Leitao <leitao@debian.org> >> >> For dummy devices, exit earlier at free_netdev() instead of executing >> the whole function. This is necessary, because dummy devices are >> special, and shouldn't have the second part of the function executed. >> >> Otherwise reg_state, which is NETREG_DUMMY, will be overwritten and >> there will be no way to identify that this is a dummy device. Also, this >> device do not need the final put_device(), since dummy devices are not >> registered (through register_netdevice()), where the device reference is >> increased (at netdev_register_kobject()/device_add()). >> >> Suggested-by: Jakub Kicinski <kuba@kernel.org> >> Signed-off-by: Breno Leitao <leitao@debian.org> >> Reviewed-by: Ido Schimmel <idosch@nvidia.com> >> Signed-off-by: David S. Miller <davem@davemloft.net> >> Signed-off-by: Dust Li <dust.li@linux.alibaba.com> >> --- >> net/core/dev.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) > > ><formletter> > >This is not the correct way to submit patches for inclusion in the >stable kernel tree. Please read: > https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html >for how to do this properly. > ></formletter> Hi Greg, Sorry, I missed the upstream commit id in the commit message. I'll pay more attention on that next time. BTW I notice Sasha had already picked it and added the corrent id, thanks Sasha ! Best regards, Dust
Technical Details
Message-ID:
<awUO0BqIzkLTLvFb@linux.alibaba.com>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-369991-linux-kernel-netdev=dewy.ruReferences:
<20261107161415.1917665-1-dust.li@linux.alibaba.com> <2026112329-moonshine-vanity-29ae@gregkh>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-369991-linux-kernel-netdev=dewy.ru
From: dust.li@linux.alibaba.com (Dust Li)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH 6.6.y] net: free_netdev: exit earlier if dummy
Date: Tue, 24 Nov 2026 12:13:04 +0800
Organization: Usenet Network
Message-ID: <awUO0BqIzkLTLvFb@linux.alibaba.com>
References: <20261107161415.1917665-1-dust.li@linux.alibaba.com>
<2026112329-moonshine-vanity-29ae@gregkh>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
logging-data="4048890"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:5MPHaERHO5dXsjWPQ9HVDSC/R/Q= sha256:CUDHWyNauP5lD1NcaBT5XXeulL49z+y20dEfrukdZ4I=
sha1:E8ghhGZpzs5ROfHegxm3ITzS5lw= sha256:+SGnxqI35KfzScYemozH3kmgGc1JpzX32uYYBHzJpR4=
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 DD999125DCD; Tue, 24 Nov 2026 07:13:43 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -10.55
X-Spam-Status: No, score=-10.55 tagged_above=-9999 required=6.31
tests=[DCC_REPUT_70_89=0.1, 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, UNPARSEABLE_RELAY=0.001, USER_IN_DEF_DKIM_WL=-7.5]
autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key)
header.d=linux.alibaba.com
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 TAw2-pQvB_qQ;
Tue, 24 Nov 2026 07:13:35 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-369991-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=linux.alibaba.com
X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])
by mail.dewy.ru (Postfix) with ESMTPS id DD8FD125DC9; Tue, 24 Nov 2026 07:13:24 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by sin.lore.kernel.org (Postfix) with ESMTP id 86EE7273A6; Tue, 24 Nov 2026 04:13:19 +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=1795493596;
b=qFYmwI+blZWswMmGpo0YTKb4XODkiYBj0SUXUc4qQwIE5J0pgHPSKg/qoLWO+H4nXJR0
QOhhoMesoZj1Su/wGCvnRhWHjR2AzU5ReeOSFFu0GjuI6N5sM6DcN4HQcZvniavOu1jLK
Fx/hTq9pOINrIuOai6Uqvm8JompeOXtGuGu2LKU+WQ2tW+2usz3YsJOrCRL/UdvfhzBDE
FNiP5DBUXtufnrZ5cjhMC2JUbtNDqNyTIQXSYMqG9RPHCL19DEvBD0/C1PZaAChXezHBY
Z/ug626hr5vI/prSJxS37iZdlCMtQfoFnJjaNJh1zqqgNkcOdJ/ojtuICMcryE2uXRA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1795493596;
h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:
X-Alimail-AntiSpam:Received:Date:From:To:Cc:Subject:Message-ID:
Reply-To: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=wgVbbg8AN2+MC7E46KUqvSner2LscJzA+99+j0fw+b0=;
b=vmM5kV9OYm4gzzuwsAykwKBGf2qg+wHGwWw0x5ADYooCqDFoFc/OBopWOK/7Fxvpu3f+
BMQ/5SjpMrPX6Stz36FWCuNBy3uNoAJn8bEAiP0XRePvHHv5upSXD3jwT//lHX2sQ4iaf
u4SqTPI8y6F1eiekPoVjrJ9E7dgathYhQJNv7zlaWoHLGKamfUOHxyAfm59YzKMmyAm2i
SVF3SF9d4q9qvB3krah48HXsLH55mGd+3/hhCSx1W4pkBLId4vaygSbx9c6jGLkEReg0J
1hn7EXM9SlG7jtmWmS7dSiWEcVsPYs7NkPY5kZwSvLCAeAACwd3hQ8vNN9Gpeig5iTw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=linux.alibaba.com header.i=@linux.alibaba.com header.a=rsa-sha256 header.s=default header.b="f9/Yjb0N";
dmarc=pass header.from=linux.alibaba.com;
spf=pass smtp.mailfrom=linux.alibaba.com;
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 6D3C7606A32E;
Tue, 24 Nov 2026 04:13:16 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.a=rsa-sha256 header.s=default header.b=f9/Yjb0N
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=115.124.30.124
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1795493590;
b=kYjVtTjE2YcrAqmNjkcPZvDO/QoehZO/7bdfpxKN7e12WdXaYv2crQgt9F7KBt064rQw
fC0UdYnMgBCXVWCsRiw8h2zB4nGmCoXlVPMB4j0qdCRwj1M8CcpI6ZuUOgdj2FpdMY7a1
ee4RZ7euQku7yGKD+RTuntaUxDE3cDZspwDEH0OLX8z7CXzUgFHhzuXat1Haa/8hyP8/q
8+kcOAgQdAvDJs8+Z6NPjEOrJTVj3EImbS9zsW0DBkfptwq6xpp9gUbl+wx798wT0jKL4
ksi4ljhwPyjWKB8H+HL7rm0+8m78b/kmprh49reCKkucovbcpACToXElRuI1JzQzpDg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1795493590;
h=DMARC-Filter:DKIM-Signature:X-Alimail-AntiSpam:Received:Date:From:To:
Cc:Subject:Message-ID:Reply-To:References:MIME-Version:Content-Type:
Content-Disposition:In-Reply-To;
bh=wgVbbg8AN2+MC7E46KUqvSner2LscJzA+99+j0fw+b0=;
b=tze1PwG6h4oc34Nbb2cD3d1iMW1tTl8nK/xz4e2DJQELzw7iY6nEPPYUObVdNDd/CK5A
4JGyi/wmUZK1eHybA5fuCOS10BR5yNx0qPPRjAp4dPSLt5oYwTPlsD+Mi3FZ8/E2GFPto
BWeZlvt1vVpuzJtbHUHlfDw29Gkx85Kv5SMHVJyZH64DuYtUurhnG4s6fRbNZQ1pM9d63
9WoII3rN1ZLYx0voEGWp0rbqmbrB7Gsk+RH1ugATv4cMniiHRyh1ngYwt9wgBYZHMImoF
GCthvNz80OBUK0ja191hcOHVQ13OL8JdS63Gc5EXy1Ka7Il8UEGbxAcbQqEyT3uLtuw==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass header.from=linux.alibaba.com;
spf=pass smtp.mailfrom=linux.alibaba.com;
dkim=pass header.d=linux.alibaba.com header.i=@linux.alibaba.com header.a=rsa-sha256 header.s=default header.b="f9/Yjb0N";
arc=none smtp.remote-ip=115.124.30.124
X-Received: from out30-124.freemail.mail.aliyun.com (out30-124.freemail.mail.aliyun.com [115.124.30.124])
(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 EF98B606A31E;
Tue, 24 Nov 2026 04:13:08 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org EF98B606A31E
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=linux.alibaba.com; s=default;
t=1795493585; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type;
bh=wgVbbg8AN2+MC7E46KUqvSner2LscJzA+99+j0fw+b0=;
b=f9/Yjb0NXEHBedXWjgqEvPuTBmkS669673zujoI6o+wM66P5KOO5vn4cw7APgt5XegCg2vj3pGjZLFlY01oSoMAu7hb6Vn6dFo1kZC9CXl1FpSuQchaWBHrlv2fwAekXtCHk4Xg+YwJE8MFHhjhau2V6RsuLDYBaxv8C+/Q1XSI=
X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R151e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033045133197;MF=dust.li@linux.alibaba.com;NM=1;PH=DS;RN=10;SR=0;TI=SMTPD_---0XFNJZxt_1795493584;
X-Received: from localhost(mailfrom:dust.li@linux.alibaba.com fp:SMTPD_---0XFNJZxt_1795493584 cluster:ay36)
by smtp.aliyun-inc.com;
Tue, 24 Nov 2026 12:13:05 +0800
X-Cc: stable@vger.kernel.org, Breno Leitao <leitao@debian.org>,
Sasha Levin <sashal@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
X-Reply-To: dust.li@linux.alibaba.com
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: <2026112329-moonshine-vanity-29ae@gregkh>