Received: by 2002:ab2:687:0:b0:1f4:6588:b3a7 with SMTP id s7csp151028lqe; Tue, 9 Apr 2024 18:46:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXBgS596XBYsZI0ANOls8GuB9D+OOtV2AVm/3qf4mrZ30USK+jDwx1BjCopN37qz6eRhYhqatFBXbmHLstYF3Kuwm03U43wHmuQ2O9fCA== X-Google-Smtp-Source: AGHT+IGsKegL9j13Z+/VZknyA9UbwekI3XR+V410G9An0GQjnq5mBynLRRYGEd3PPX1bcuW4dHnW X-Received: by 2002:a17:906:b858:b0:a47:61d:7d38 with SMTP id ga24-20020a170906b85800b00a47061d7d38mr1007087ejb.0.1712713594207; Tue, 09 Apr 2024 18:46:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712713594; cv=pass; d=google.com; s=arc-20160816; b=z0EyDPxnrpZxkIiLQmrN5M5au+JxGEzPrilzOsUOlOybOQfBWwZT2DrBVVkEsBsikV r+whjgUkggsMfQNymdqHR1hQWK6hOwOg//FNMt0McqB/UiJyQY8YG30u2JJTdh63KgEs fthJ3HbIwvQbXT2rTVskIgdaR+P7Qc6Ruq9Bdl6Ygmt5hlLOIlgYSivxiJhzHgQNXQ7Z 2pqz05LfIxHn844HBXWlIAqnCtSZfIQEBXakDp8zHYO8fNZQvZns4bDCMS2jCHCdId2l 5G+ST7l6YSZ6jhmsrkbHwZtbRXBFoMWps1J7OFSezIs3h24deCPyQRHQ5so20MoRx3qF K3Xw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=Qfm32UeQ5h10peikRax6Cr16r09b7jPDRi2tP8rOrfw=; fh=NcgV5qdcrW1WBXR3NCAIkS4fYOxWlo93c7hcIRq+jIc=; b=NVVQ0u4OD/9MVl3h0W4bkZzhLf8CVLs4MkD+3UnP6TTjpk2zJqLpidc/NGWN5ZIZVO dJQssQWnOUPQDqEiQDv7fxw0AkHTDywClfex2YSohZ0mXGPSzx4Nn5mYWU6qO8vDVMP3 sZdgl/U1AYFbP2ozebMvlX1n2JbF3/o11Co4fkkDzYx0FCHeyaZgDjgTddp/vByjCxMq o+0pxtYQ44q1JGZPnzWIp9LkYE2xyGz4iylnJz95jz6Bht9lskZ20j5WxcVqgul1oz4T dgVJCAFiqC1poDpK/bJ2P5UnwpeKlq6AE1sPabiIH/A4AQ65obb8FC70e9KPv88sJUkq e01w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="I/78VjWd"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-6058-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6058-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id qf34-20020a1709077f2200b00a519f81ef15si5482764ejc.782.2024.04.09.18.46.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 18:46:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-6058-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="I/78VjWd"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-6058-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6058-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 C9A441F22919 for ; Wed, 10 Apr 2024 01:46:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F30931388; Wed, 10 Apr 2024 01:46:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="I/78VjWd" X-Original-To: linux-wireless@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 B85D015A4; Wed, 10 Apr 2024 01:46:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712713587; cv=none; b=HtDsmNuBJIvdW0Y+Lhencar1OsY8m3YP3kaZ5lp0CL2h3iwXaFwpfCaZQvEOlVAuPohPlOp6UTohO4YMdp9/z/32EKhpKoo/nQYtEHzW5LHQ6toedp/R7qXvMW8LLvPXGx2LQwWC4z8U3Ws3aS7WbZkhtQIfJ6hbQj2To5MhGW8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712713587; c=relaxed/simple; bh=1YgFdUcBOKesTaua31ZEyD1c9Gpgvfr0heHVZed0Enk=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=FAbalXxZN1JpQBl13Anor0GjbmosIr42lIDoS9VaMG0iSzT1sbkVaG200g0tsj46N23w30h4d5CL3x1JkQnQuL5sEgobJUpGgTwwLQiuAeOHENnm9CMhT1khM2awZR8rmrtuiMlThjZsxqd7bucw32IVMah3cQ+irbzd8p46Apc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=I/78VjWd; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id F0D42C433F1; Wed, 10 Apr 2024 01:46:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712713587; bh=1YgFdUcBOKesTaua31ZEyD1c9Gpgvfr0heHVZed0Enk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=I/78VjWdo/c0F0Ap07gI5asrS7PrsOu2M02J+DbxVjLWDvzFOCQj0or2QN13AWozE I69cMnaM1ljMIhs/0Lp84+zGGrKjGK+/CXANY3BLrmNxLBhq4kaduZjuEReLaCWWCM rte8M4SlHEUagzJtAXFK0rggGoLFQZvYFbNsor1v1NzuoQK/a4YRotlvV3NLP6fos1 5WsKk0K30sTsNVRZti9VcJ00BcNP1yTZV7kxZYXi4/yHOzNi43F1A9xC8vq4CFQg0l rwcAwaw4bJhCi9poeYvELIrMuEt8FcP5FKz1pc4TBZxdLGNQelNbfUOj7E91vbTg6q dEzc8Cp+Z0Vvg== Date: Tue, 9 Apr 2024 18:46:25 -0700 From: Jakub Kicinski To: Breno Leitao Cc: aleksander.lobakin@intel.com, 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 v4 1/9] net: free_netdev: exit earlier if dummy Message-ID: <20240409184625.301e4bc0@kernel.org> In-Reply-To: <20240409125738.1824983-2-leitao@debian.org> References: <20240409125738.1824983-1-leitao@debian.org> <20240409125738.1824983-2-leitao@debian.org> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 9 Apr 2024 05:57:15 -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 for dummy devices, 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()). There's a small fuzz when applying due to the phy topo changes landing, please rebase, the CI didn't ingest it right. -- pw-bot: cr