File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -2257,17 +2257,15 @@ static int netvsc_remove(struct hv_device *dev)
2257
2257
2258
2258
cancel_delayed_work_sync (& ndev_ctx -> dwork );
2259
2259
2260
- rcu_read_lock ();
2261
- nvdev = rcu_dereference (ndev_ctx -> nvdev );
2262
-
2263
- if (nvdev )
2260
+ rtnl_lock ();
2261
+ nvdev = rtnl_dereference (ndev_ctx -> nvdev );
2262
+ if (nvdev )
2264
2263
cancel_work_sync (& nvdev -> subchan_work );
2265
2264
2266
2265
/*
2267
2266
* Call to the vsc driver to let it know that the device is being
2268
2267
* removed. Also blocks mtu and channel changes.
2269
2268
*/
2270
- rtnl_lock ();
2271
2269
vf_netdev = rtnl_dereference (ndev_ctx -> vf_netdev );
2272
2270
if (vf_netdev )
2273
2271
netvsc_unregister_vf (vf_netdev );
@@ -2279,7 +2277,6 @@ static int netvsc_remove(struct hv_device *dev)
2279
2277
list_del (& ndev_ctx -> list );
2280
2278
2281
2279
rtnl_unlock ();
2282
- rcu_read_unlock ();
2283
2280
2284
2281
hv_set_drvdata (dev , NULL );
2285
2282
You can’t perform that action at this time.
0 commit comments