Commit 018349d 1 parent f5b9bac commit 018349d Copy full SHA for 018349d
File tree 1 file changed +3
-6
lines changed
1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -2272,17 +2272,15 @@ static int netvsc_remove(struct hv_device *dev)
2272
2272
2273
2273
cancel_delayed_work_sync (& ndev_ctx -> dwork );
2274
2274
2275
- rcu_read_lock ();
2276
- nvdev = rcu_dereference (ndev_ctx -> nvdev );
2277
-
2278
- if (nvdev )
2275
+ rtnl_lock ();
2276
+ nvdev = rtnl_dereference (ndev_ctx -> nvdev );
2277
+ if (nvdev )
2279
2278
cancel_work_sync (& nvdev -> subchan_work );
2280
2279
2281
2280
/*
2282
2281
* Call to the vsc driver to let it know that the device is being
2283
2282
* removed. Also blocks mtu and channel changes.
2284
2283
*/
2285
- rtnl_lock ();
2286
2284
vf_netdev = rtnl_dereference (ndev_ctx -> vf_netdev );
2287
2285
if (vf_netdev )
2288
2286
netvsc_unregister_vf (vf_netdev );
@@ -2294,7 +2292,6 @@ static int netvsc_remove(struct hv_device *dev)
2294
2292
list_del (& ndev_ctx -> list );
2295
2293
2296
2294
rtnl_unlock ();
2297
- rcu_read_unlock ();
2298
2295
2299
2296
hv_set_drvdata (dev , NULL );
2300
2297
You can’t perform that action at this time.
0 commit comments