[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250725071434.4e1611fe@kernel.org>
Date: Fri, 25 Jul 2025 07:14:34 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Paolo Abeni <pabeni@...hat.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
andrew+netdev@...n.ch, horms@...nel.org, Jason Wang <jasowang@...hat.com>,
Zigit Zo <zuozhijie@...edance.com>, "Michael S. Tsirkin" <mst@...hat.com>,
Xuan Zhuo <xuanzhuo@...ux.alibaba.com>, Eugenio Pérez
<eperezma@...hat.com>, leitao@...ian.org, sdf@...ichev.me
Subject: Re: [PATCH net] netpoll: prevent hanging NAPI when netcons gets
enabled
On Fri, 25 Jul 2025 14:23:26 +0200 Paolo Abeni wrote:
> > If this warning hits the next virtio_close() will hang.
> >
> > Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> > Reported-by: Paolo Abeni <pabeni@...hat.com>
> > Link: https://lore.kernel.org/c5a93ed1-9abe-4880-a3bb-8d1678018b1d@redhat.com
> > Signed-off-by: Jakub Kicinski <kuba@...nel.org>
>
> It's not clear to me if you have been able to validate the patch into
> NIPA already?
Sorry for the omission, I sent the patch in the evening after just
3 iterations but left the test running. It completed 30 iterations
cleanly (boot, run the selected tests, no hangs).
> > +static int netconsole_setup_and_enable(struct netconsole_target *nt)
> > +{
> > + int ret;
> > +
> > + ret = netpoll_setup(&nt->np);
> > + if (ret)
> > + return ret;
> > +
> > + /* Make sure all NAPI polls which started before dev->npinfo
> > + * was visible have exited before we start calling NAPI poll.
> > + * NAPI skips locking if dev->npinfo is NULL.
> > + */
> > + synchronize_rcu();
>
> I'm wondering if it would make any sense to move the above in
> netpoll_setup(), make the exposed symbol safe.
Fair, somehow I convinced myself that the nt->enabled = true;
is more relevant.
Powered by blists - more mailing lists