Received: by 2002:ab2:4a89:0:b0:1f4:a8b6:6e69 with SMTP id w9csp252391lqj; Wed, 10 Apr 2024 09:22:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUNjDDtbAyyTjIs1zq5augyWK1+9Rj+TgTt3Qvr/IlWuwv3vX2QsorXOhr+shc/+NW33+w+p7S4mXA7htJ/p5KzKJJ/9UqjfqbXFoI2IQ== X-Google-Smtp-Source: AGHT+IGWuUG4EMxzSoyEKmyiwTykleLGQ022QJ6cTyU+V4EWFocqHtJvWQxKtnLD+fPWlpHG14fx X-Received: by 2002:a50:cc8e:0:b0:56b:ff5d:8bdc with SMTP id q14-20020a50cc8e000000b0056bff5d8bdcmr2176930edi.32.1712766177443; Wed, 10 Apr 2024 09:22:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712766177; cv=pass; d=google.com; s=arc-20160816; b=xQXlpPsgwXfFS/1fmeRAATsOfKTDM6hvJBPXAtIOI3iAw3VxZMrjffJmYe/4BgcwAq vH6CWxdnI57/9+IouJ3rz0jMhI0DvNE8UF1GsjPoCdAw1tXB9oUGtmVLRpMzx3P9pHHU /3mdwUWmSArwToS9JzKMT7z4ZHnUqfrnwM9pdlCaEcTPX7mA1BN9Oy1NJtEjZf8QJKq+ otgRF/U7qDJD5tqcYbihg5pwV0pkwzjGiqaY9ZUXvW/h1T5P4DSf/r8sRRrfwQOiITkX d1pbRN8cDA6zKErsajZCxrEKgkM505pGVtO4VEH+N8v/vRP9PvaBpw+WHY+bscmV1D57 dncA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:feedback-id:dkim-signature; bh=TDGvkul+Q73nN0fHZOhTAHooDQZwt3FC9x/QxxSs3zo=; fh=4tFhkoop61m1tmXk9KOeGpJvmTD4UR6K57gVDoixiKg=; b=uDHvFGpMIiVLq4pMbIO/84mf7bn0CfckQain0x4NGDDabXBBoyDGCbLumAmjt6Txso 1elo0iNTGqA/AClMagzcpKd4ndN6SPW1VdpsP5zdZrSXkgpIY6XmpWKm8Z5QTerTqzVF x9S45yMWgRoLy27xCfKKrseKOjH9yCjBZLdP+soeg3V28zvxHteoes/piZAiqV8J8W/D X0xdZ5iI2vtol0ZbYfNQj6jZ6e83M1A+emTlv5omyQzI8Ig1jNekppWjOp2F8Bl0nfJj 6KMcMa2uQ2cDInjTQcEiFjXQ/0aDH8tXCHBgcjt7W403Uj3P/pN2Yz0r1X4QGonn2l9Z vOJA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=SNGUDwkX; arc=pass (i=1 dkim=pass dkdomain=messagingengine.com); spf=pass (google.com: domain of linux-kernel+bounces-138842-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-138842-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id eo4-20020a056402530400b0056be0082fcasi6142998edb.673.2024.04.10.09.22.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 09:22:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-138842-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=SNGUDwkX; arc=pass (i=1 dkim=pass dkdomain=messagingengine.com); spf=pass (google.com: domain of linux-kernel+bounces-138842-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-138842-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 84CAE1F28A4E for ; Wed, 10 Apr 2024 15:06:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EA81916DEDC; Wed, 10 Apr 2024 15:05:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="SNGUDwkX" Received: from wfhigh3-smtp.messagingengine.com (wfhigh3-smtp.messagingengine.com [64.147.123.154]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 953A416C877; Wed, 10 Apr 2024 15:05:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=64.147.123.154 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712761558; cv=none; b=A1DlDub83agIsr1T1YkejQwXrshTqYEUXRXDltLuKLzvCkWH8UzexbygWKEu60lQ2aX7+Be/X8aWBkzxnmW2Atk/+bEi6H0BpoTcIAG2v9+a2WFU7jRUrIn7YN6uTt4hvz28bxKgmYiNF0vTo6QcjYRrJlC3/p9y05s8JBxnwZM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712761558; c=relaxed/simple; bh=cUzFDAS3EbYkXdW7wC2mTAuzm+O4VDnkMYMj/YD+Qr0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=aaHShbInXeEJ9YENnC/6jkDq7rvwUNIbe1y4X1JmHzQ/lWQIfKxJIMQ0ZK8f9zcDnhr+7omm0Z1y7h9aeuNnUT7K5V6MvXWfqZMQP0uhjdPu63eXXQ/cyuFOplPxOOoePs5TlDwHil8hbqA4up8ObWOtja3uEUWohXirpx0ynhU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=idosch.org; spf=none smtp.mailfrom=idosch.org; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=SNGUDwkX; arc=none smtp.client-ip=64.147.123.154 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=idosch.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=idosch.org Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfhigh.west.internal (Postfix) with ESMTP id AF66B18000F0; Wed, 10 Apr 2024 11:05:52 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 10 Apr 2024 11:05:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1712761552; x=1712847952; bh=TDGvkul+Q73nN0fHZOhTAHooDQZw t3FC9x/QxxSs3zo=; b=SNGUDwkXjBq6YtQxxM3lA3GMHmXSrT2cy2J4JaBa5KHE Hc+xeukLb0K8D1cZxsH4khv3vX5w4V26Ev7YwRBsBzEtfVxXcQG/DDo7Wq92YHEw dcfJTEmtqnjPnc9NgFt/el+AJwp41r1btXkQrABaZ7W99StTxiXT58NBJ8p2lltD iUKRp+tK1x7+tt/v5GS20dHXtRAxxLkSGlKzr4tdgJHRLM34nG7atn/SqZAqyZjE Kghp5JrU2hT2wOiFqGuku2InwpV8r62JpiCDJeaLhY1qurB+4dCCtq3yEjCwQQhp exn1cwQNlaGDPugyI06Ob69hDT0wm+lzpi7kihAHuA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudehiedgkedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepkfguohcu ufgthhhimhhmvghluceoihguohhstghhsehiughoshgthhdrohhrgheqnecuggftrfgrth htvghrnhepvddufeevkeehueegfedtvdevfefgudeifeduieefgfelkeehgeelgeejjeeg gefhnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepih guohhstghhsehiughoshgthhdrohhrgh X-ME-Proxy: Feedback-ID: i494840e7:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 10 Apr 2024 11:05:50 -0400 (EDT) Date: Wed, 10 Apr 2024 18:05:47 +0300 From: Ido Schimmel To: Breno Leitao Cc: aleksander.lobakin@intel.com, kuba@kernel.org, davem@davemloft.net, pabeni@redhat.com, edumazet@google.com, elder@kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, nbd@nbd.name, sean.wang@mediatek.com, Mark-MC.Lee@mediatek.com, lorenzo@kernel.org, taras.chornyi@plvision.eu, ath11k@lists.infradead.org, ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, geomatsi@gmail.com, kvalo@kernel.org, quic_jjohnson@quicinc.com, leon@kernel.org, dennis.dalessandro@cornelisnetworks.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, Jiri Pirko , Simon Horman , Daniel Borkmann , Sebastian Andrzej Siewior Subject: Re: [PATCH net-next v5 02/10] net: free_netdev: exit earlier if dummy Message-ID: References: <20240410131407.3897251-1-leitao@debian.org> <20240410131407.3897251-3-leitao@debian.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240410131407.3897251-3-leitao@debian.org> On Wed, Apr 10, 2024 at 06:13:43AM -0700, Breno Leitao wrote: > 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 > Signed-off-by: Breno Leitao Reviewed-by: Ido Schimmel