diff options
Diffstat (limited to 'net/openvswitch/datapath.c')
-rw-r--r-- | net/openvswitch/datapath.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index ef38e5aecd28..9746ee30a99b 100644 --- a/net/openvswitch/datapath.c +++ b/net/openvswitch/datapath.c | |||
@@ -2364,8 +2364,10 @@ static void __net_exit ovs_exit_net(struct net *dnet) | |||
2364 | __dp_destroy(dp); | 2364 | __dp_destroy(dp); |
2365 | 2365 | ||
2366 | rtnl_lock(); | 2366 | rtnl_lock(); |
2367 | down_read(&net_rwsem); | ||
2367 | for_each_net(net) | 2368 | for_each_net(net) |
2368 | list_vports_from_net(net, dnet, &head); | 2369 | list_vports_from_net(net, dnet, &head); |
2370 | up_read(&net_rwsem); | ||
2369 | rtnl_unlock(); | 2371 | rtnl_unlock(); |
2370 | 2372 | ||
2371 | /* Detach all vports from given namespace. */ | 2373 | /* Detach all vports from given namespace. */ |