aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZigit Zo <[email protected]>2025-07-16 11:57:17 +0000
committerJakub Kicinski <[email protected]>2025-07-17 14:37:59 +0000
commitbe5dcaed694e4255dc02dd0acfe036708c535def (patch)
treef66af8dec7f71265d8a3d93c614a56eed0f16be8
parentnet/mlx5: Update the list of the PCI supported devices (diff)
downloadkernel-be5dcaed694e4255dc02dd0acfe036708c535def.tar.gz
kernel-be5dcaed694e4255dc02dd0acfe036708c535def.zip
virtio-net: fix recursived rtnl_lock() during probe()
The deadlock appears in a stack trace like: virtnet_probe() rtnl_lock() virtio_config_changed_work() netdev_notify_peers() rtnl_lock() It happens if the VMM sends a VIRTIO_NET_S_ANNOUNCE request while the virtio-net driver is still probing. The config_work in probe() will get scheduled until virtnet_open() enables the config change notification via virtio_config_driver_enable(). Fixes: df28de7b0050 ("virtio-net: synchronize operstate with admin state on up/down") Signed-off-by: Zigit Zo <[email protected]> Acked-by: Michael S. Tsirkin <[email protected]> Acked-by: Jason Wang <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
-rw-r--r--drivers/net/virtio_net.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 5d674eb9a0f2..82b4a2a2b8c4 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -7059,7 +7059,7 @@ static int virtnet_probe(struct virtio_device *vdev)
otherwise get link status from config. */
netif_carrier_off(dev);
if (virtio_has_feature(vi->vdev, VIRTIO_NET_F_STATUS)) {
- virtnet_config_changed_work(&vi->config_work);
+ virtio_config_changed(vi->vdev);
} else {
vi->status = VIRTIO_NET_S_LINK_UP;
virtnet_update_settings(vi);