public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rik van Riel <riel@surriel.com>
To: Breno Leitao <leitao@debian.org>,
	kuba@kernel.org, davem@davemloft.net,  edumazet@google.com,
	pabeni@redhat.com
Cc: thepacketgeek@gmail.com, horms@kernel.org,
	netdev@vger.kernel.org,  linux-kernel@vger.kernel.org,
	paulmck@kernel.org, davej@codemonkey.org.uk
Subject: Re: [RFC PATCH 1/2] netpoll: extract core of netpoll_cleanup
Date: Thu, 18 Jul 2024 15:47:43 -0400	[thread overview]
Message-ID: <ff42f723b718c7ac8aee992ba0719cb56910ebe3.camel@surriel.com> (raw)
In-Reply-To: <20240718184311.3950526-2-leitao@debian.org>

On Thu, 2024-07-18 at 11:43 -0700, Breno Leitao wrote:
> Extract the core part of netpoll_cleanup(), so, it could be called
> from
> a caller that has the rtnl lock already.
> 
> Netconsole uses this in a weird way right now:
> 
> 	__netpoll_cleanup(&nt->np);
> 	spin_lock_irqsave(&target_list_lock, flags);
> 	netdev_put(nt->np.dev, &nt->np.dev_tracker);
> 	nt->np.dev = NULL;
> 	nt->enabled = false;
> 
> This will be replaced by do_netpoll_cleanup() as the locking
> situation
> is overhauled.
> 
> Signed-off-by: Breno Leitao <leitao@debian.org>

Reviewed-by: Rik van Riel <riel@surriel.com>

-- 
All Rights Reversed.

  reply	other threads:[~2024-07-18 19:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-18 18:43 [RFC PATCH 0/2] netconsole: Fix netconsole unsafe locking Breno Leitao
2024-07-18 18:43 ` [RFC PATCH 1/2] netpoll: extract core of netpoll_cleanup Breno Leitao
2024-07-18 19:47   ` Rik van Riel [this message]
2024-07-18 18:43 ` [RFC PATCH 2/2] netconsole: Defer netpoll cleanup to avoid lock release during list traversal Breno Leitao
2024-07-18 19:53   ` Rik van Riel
2024-07-22  9:44     ` Breno Leitao

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=ff42f723b718c7ac8aee992ba0719cb56910ebe3.camel@surriel.com \
    --to=riel@surriel.com \
    --cc=davej@codemonkey.org.uk \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=leitao@debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=paulmck@kernel.org \
    --cc=thepacketgeek@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox