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 @@ -2272,17 +2272,15 @@ static int netvsc_remove(struct hv_device *dev)
22722272
22732273 cancel_delayed_work_sync (& ndev_ctx -> dwork );
22742274
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 )
22792278 cancel_work_sync (& nvdev -> subchan_work );
22802279
22812280 /*
22822281 * Call to the vsc driver to let it know that the device is being
22832282 * removed. Also blocks mtu and channel changes.
22842283 */
2285- rtnl_lock ();
22862284 vf_netdev = rtnl_dereference (ndev_ctx -> vf_netdev );
22872285 if (vf_netdev )
22882286 netvsc_unregister_vf (vf_netdev );
@@ -2294,7 +2292,6 @@ static int netvsc_remove(struct hv_device *dev)
22942292 list_del (& ndev_ctx -> list );
22952293
22962294 rtnl_unlock ();
2297- rcu_read_unlock ();
22982295
22992296 hv_set_drvdata (dev , NULL );
23002297
You can’t perform that action at this time.
0 commit comments