Re: [RFC PATCH 1/2] netpoll: extract core of netpoll_cleanup

From: Rik van Riel
Date: Thu Jul 18 2024 - 15:48:42 EST


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@xxxxxxxxxx>

Reviewed-by: Rik van Riel <riel@xxxxxxxxxxx>

--
All Rights Reversed.