All of lore.kernel.org
 help / color / mirror / Atom feed
From: Breno Leitao <leitao@debian.org>
To: Gustavo Luiz Duarte <gustavold@gmail.com>
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
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	[thread overview]
Message-ID: <atCkMJcghkV7DD4S@gmail.com> (raw)
In-Reply-To: <20261012-netcons-fixes-next-v2-2-ac8ec4c62edb@gmail.com>

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>

  reply	other threads:[~2026-10-15 10:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-12 17:03 [PATCH net-next v2 0/2] netconsole: add locking to configfs _show callbacks Gustavo Luiz Duarte
2026-10-12 17:03 ` [PATCH net-next v2 1/2] netconsole: avoid printing partially updated target attributes Gustavo Luiz Duarte
2026-10-13 17:20   ` netdev-bot+sashiko
2026-10-14 18:39     ` Gustavo Luiz Duarte
2026-10-15  9:59   ` Breno Leitao
2026-10-12 17:03 ` [PATCH net-next v2 2/2] netconsole: remove unnecessary target refcounting from the netdev notifier Gustavo Luiz Duarte
2026-10-15 10:13   ` Breno Leitao [this message]
2026-10-12 17:10 ` [PATCH net-next v2 0/2] netconsole: add locking to configfs _show callbacks netdev-bot+sinfo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=atCkMJcghkV7DD4S@gmail.com \
    --to=leitao@debian.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=gustavold@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.