[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20201222183001.4e88f959@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Tue, 22 Dec 2020 18:30:01 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Jason Wang <jasowang@...hat.com>
Cc: Jeff Dike <jdike@...mai.com>,
"Michael S. Tsirkin" <mst@...hat.com>,
virtualization@...ts.linux-foundation.org,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH] virtio_net: Fix recursive call to cpus_read_lock()
On Tue, 22 Dec 2020 11:49:04 +0800 Jason Wang wrote:
> On 2020/12/22 上午11:36, Jeff Dike wrote:
> > virtnet_set_channels can recursively call cpus_read_lock if CONFIG_XPS
> > and CONFIG_HOTPLUG are enabled.
> >
> > The path is:
> > virtnet_set_channels - calls get_online_cpus(), which is a trivial
> > wrapper around cpus_read_lock()
> > netif_set_real_num_tx_queues
> > netif_reset_xps_queues_gt
> > netif_reset_xps_queues - calls cpus_read_lock()
> >
> > This call chain and potential deadlock happens when the number of TX
> > queues is reduced.
> >
> > This commit the removes netif_set_real_num_[tr]x_queues calls from
> > inside the get/put_online_cpus section, as they don't require that it
> > be held.
> >
> > Signed-off-by: Jeff Dike <jdike@...mai.com>
>
> Adding netdev.
>
> The patch can go with -net and is needed for -stable.
>
> Acked-by: Jason Wang <jasowang@...hat.com>
Thanks, we'll need a repost with netdev CCed to apply it to net,
I don't have this one in my inbox or in patchwork.
Jeff please make sure to keep the acks when reposting.
Powered by blists - more mailing lists