Commit 2526612
virtio-net: fix race between set queues and probe
A race were found where set_channels could be called after registering
but before virtnet_set_queues() in virtnet_probe(). Fixing this by
moving the virtnet_set_queues() before netdevice registering. While at
it, use _virtnet_set_queues() to avoid holding rtnl as the device is
not even registered at that time.
Cc: stable@vger.kernel.org
Fixes: a220871 ("virtio-net: correctly enable multiqueue")
Signed-off-by: Jason Wang <jasowang@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Link: https://lore.kernel.org/r/20230725072049.617289-1-jasowang@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent 6c58c88 commit 2526612
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4219 | 4219 | | |
4220 | 4220 | | |
4221 | 4221 | | |
| 4222 | + | |
| 4223 | + | |
4222 | 4224 | | |
4223 | 4225 | | |
4224 | 4226 | | |
| |||
4257 | 4259 | | |
4258 | 4260 | | |
4259 | 4261 | | |
4260 | | - | |
4261 | | - | |
4262 | 4262 | | |
4263 | 4263 | | |
4264 | 4264 | | |
| |||
0 commit comments