Skip to content

Commit 962c661

Browse files
committed
Merge branch 'xen-netfront-fixes'
Ross Lagerwall says: ==================== xen-netfront: Fix issues with commit f599c64 Fix a couple of issues with commit f599c64 ("xen-netfront: Fix race between device setup and open"). ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 44a5cd4 + 45c8184 commit 962c661

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

drivers/net/xen-netfront.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1810,7 +1810,7 @@ static int talk_to_netback(struct xenbus_device *dev,
18101810
err = xen_net_read_mac(dev, info->netdev->dev_addr);
18111811
if (err) {
18121812
xenbus_dev_fatal(dev, err, "parsing %s/mac", dev->nodename);
1813-
goto out;
1813+
goto out_unlocked;
18141814
}
18151815

18161816
rtnl_lock();
@@ -1925,6 +1925,7 @@ static int talk_to_netback(struct xenbus_device *dev,
19251925
xennet_destroy_queues(info);
19261926
out:
19271927
rtnl_unlock();
1928+
out_unlocked:
19281929
device_unregister(&dev->dev);
19291930
return err;
19301931
}
@@ -1950,10 +1951,6 @@ static int xennet_connect(struct net_device *dev)
19501951
/* talk_to_netback() sets the correct number of queues */
19511952
num_queues = dev->real_num_tx_queues;
19521953

1953-
rtnl_lock();
1954-
netdev_update_features(dev);
1955-
rtnl_unlock();
1956-
19571954
if (dev->reg_state == NETREG_UNINITIALIZED) {
19581955
err = register_netdev(dev);
19591956
if (err) {
@@ -1963,6 +1960,10 @@ static int xennet_connect(struct net_device *dev)
19631960
}
19641961
}
19651962

1963+
rtnl_lock();
1964+
netdev_update_features(dev);
1965+
rtnl_unlock();
1966+
19661967
/*
19671968
* All public and private state should now be sane. Get
19681969
* ready to start sending and receiving packets and give the driver

0 commit comments

Comments
 (0)