mirror of
https://github.com/rancher/os-kernel.git
synced 2025-07-13 13:24:03 +00:00
27 lines
791 B
Diff
27 lines
791 B
Diff
|
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
|
||
|
index d7dc95f58dae..31bc4210f969 100644
|
||
|
--- a/drivers/net/xen-netfront.c
|
||
|
+++ b/drivers/net/xen-netfront.c
|
||
|
@@ -1958,10 +1958,6 @@ static int xennet_connect(struct net_device *dev)
|
||
|
/* talk_to_netback() sets the correct number of queues */
|
||
|
num_queues = dev->real_num_tx_queues;
|
||
|
|
||
|
- rtnl_lock();
|
||
|
- netdev_update_features(dev);
|
||
|
- rtnl_unlock();
|
||
|
-
|
||
|
if (dev->reg_state == NETREG_UNINITIALIZED) {
|
||
|
err = register_netdev(dev);
|
||
|
if (err) {
|
||
|
@@ -1971,6 +1967,10 @@ static int xennet_connect(struct net_device *dev)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
+ rtnl_lock();
|
||
|
+ netdev_update_features(dev);
|
||
|
+ rtnl_unlock();
|
||
|
+
|
||
|
/*
|
||
|
* All public and private state should now be sane. Get
|
||
|
* ready to start sending and receiving packets and give the driver
|