🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #3524

Re: [PATCH net-next v2 2/2] netconsole: remove unnecessary target refcounting from the netdev notifier

#3524
From: Breno Leitao
Date: Thu, 15 Oct 2026 10:13
19 lines
6839 bytes
On Mon, Oct 12, 2026 at 06:03:44PM +0100, Gustavo Luiz Duarte wrote:
> Since netconsole_netdev_event() holds target_list_lock, there is no need
> to also protect each target with netconsole_target_get/put()
> refcounting. There is no way a target reachable from the target_list
> would go away while we hold target_list_lock.

Nice. I have never thought about it, but you are correct.  The
notifier's get/put never protected nt at all.

> This is similar to commit a6d403ac9689 ("netconsole: remove
> unnecessary netconsole_target_get/out() from write_msg()").
> 
> Since this is the only remaining user of netconsole_target_get/put(),
> remove those helpers as well.
> 
> Signed-off-by: Gustavo Luiz Duarte <gustavold@gmail.com> ---

Reviewed-by: Breno Leitao <leitao@debian.org>
Technical Details
Message-ID: <atCkMJcghkV7DD4S@gmail.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-346665-linux-kernel-netdev=dewy.ru
References: <20261012-netcons-fixes-next-v2-0-ac8ec4c62edb@gmail.com> <20261012-netcons-fixes-next-v2-2-ac8ec4c62edb@gmail.com>

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-346665-linux-kernel-netdev=dewy.ru
From: leitao@debian.org (Breno Leitao)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v2 2/2] netconsole: remove unnecessary target
 refcounting from the netdev notifier
Date: Thu, 15 Oct 2026 03:13:15 -0700
Organization: Usenet Network
Message-ID: <atCkMJcghkV7DD4S@gmail.com>
References: <20261012-netcons-fixes-next-v2-0-ac8ec4c62edb@gmail.com>
 <20261012-netcons-fixes-next-v2-2-ac8ec4c62edb@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
	logging-data="2505281"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:gUSAjnfC0itukBz6RI/bpFrdcGY= sha256:a3BQJ+jE+WscCHoWsnDLWifHZ8ur5h9kv3xhhfqL9Ks=
	sha1:oidTUwTHg2ob64Ukj9VyCjdh+LQ= sha256:HKHVZil67o5bp6vHcIy3GNcWHvliTMPusSCmZmnala8=
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 87DEA1102B3; Thu, 15 Oct 2026 13:21:10 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.29
X-Spam-Status: No, score=-3.29 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.24, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
	HEADER_FROM_DIFFERENT_DOMAINS=0.25, 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 (2048-bit key)
	header.d=debian.org
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 CLAJcmN5w2o1;
	Thu, 15 Oct 2026 13:21:08 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-346665-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=debian.org
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id D1C991102B2; Thu, 15 Oct 2026 13:20:59 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
	by sea.lore.kernel.org (Postfix) with ESMTP id 867C22A658; Thu, 15 Oct 2026 10:13:27 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 9D4FD502576;
	Thu, 15 Oct 2026 10:13:26 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=debian.org header.i=@debian.org header.b="Q8DfvsDY"
X-Received: from stravinsky.debian.org (stravinsky.debian.org [82.195.75.108])
	(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 3D2E44E325D;
	Thu, 15 Oct 2026 10:13:25 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=82.195.75.108
X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1792059206; cv=none; b=CdD6icpxugmIAe1XQiooN8gq/a9NSe9RyraEgfhfxJE1pLNtjg45dheiHFYHd1tHNzSUfpXqL0GbmzPhlN2akaGRPm8doCAsvQxn3NlgqGNqezD/qCDyAcKaWdZ3JN55CA750I7164CH2M0/cp1XXBCVFQUFi7O82NfMbMzixMQ=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1792059206; c=relaxed/simple;
	bh=b4+7BckYp/TslExRpb889Ix14EnhYPDMnBCNXxtB9JY=;
	h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
	 Content-Type:Content-Disposition:In-Reply-To; b=rYaxYRu5HTE+vEwh40tgQ4gq9cH53/o+LbMfMvRFJyEjd9Ivg2k3fyUYhXT0L9vhLIIeL0oVgXfErOlvMsaaK151a3dfSO+sHa3fAIfe8WdCHSeg0Q52JXwS7hadd4UJIBixMlpsmdin/gzupuanK5IwTtqWPFkOkK73M6YgbgE=
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=debian.org; spf=pass smtp.mailfrom=debian.org; dkim=pass (2048-bit key) header.d=debian.org header.i=@debian.org header.b=Q8DfvsDY; arc=none smtp.client-ip=82.195.75.108
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=debian.org
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=debian.org
X-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debian.org;
	s=smtpauto.stravinsky; h=X-Debian-User:In-Reply-To:Content-Type:MIME-Version:
	References:Message-ID:Subject:Cc:To:From:Date:Reply-To:
	Content-Transfer-Encoding:Content-ID:Content-Description;
	bh=WAbtlqKuP69hiwARgiPCIxV+lrBvAR1z924vTs5YTXo=; b=Q8DfvsDYll5Eyone1xL5dVJQBo
	Px63lopMx5uEVx6qTv8MIL32+9o24q7hWPvSHaNqVrAFgS99t7ZBnjMgKQXkLE5pocWUyvafejgGQ
	ArDAPGml6vnbiExm2zQVh4DJRD5ogJ+rkfhZWX4zRZQamwm0JwK4r0bjYdDE3fe6ZA0Mp8vlTH80S
	EByV1LaJZf/YrGnnoGes3rfqK4mnjSM15F9CyFC/fFVT6FV7JxJ1T0qOG3/eW52MQzagaAXOIyMwM
	+yfWUVe4AwsmFFxG567OM2EGE4WHVPzu732FtCgnDghX8oaA7zibMpVf/earPL9GoilmbYSdNrufN
	HoZBDGTA==;
X-Received: from authenticated-user
	by stravinsky.debian.org with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)
	(Exim 4.96)
	(envelope-from <leitao@debian.org>)
	id 1xHISd-0057Nd-2D;
	Thu, 15 Oct 2026 10:13:19 +0000
X-Cc: Andrew Lunn <andrew+netdev@lunn.ch>, 
	"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
X-Precedence: bulk
X-Mailing-List: netdev@vger.kernel.org
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-In-Reply-To: <20261012-netcons-fixes-next-v2-2-ac8ec4c62edb@gmail.com>
X-Debian-User: leitao