aboutsummaryrefslogtreecommitdiffstats
path: root/net/netlink/genetlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/netlink/genetlink.c')
-rw-r--r--net/netlink/genetlink.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c
index 566941e03363..44ff3f3810fa 100644
--- a/net/netlink/genetlink.c
+++ b/net/netlink/genetlink.c
@@ -220,10 +220,12 @@ static void __genl_unregister_mc_group(struct genl_family *family,
220 struct net *net; 220 struct net *net;
221 BUG_ON(grp->family != family); 221 BUG_ON(grp->family != family);
222 222
223 netlink_table_grab();
223 rcu_read_lock(); 224 rcu_read_lock();
224 for_each_net_rcu(net) 225 for_each_net_rcu(net)
225 netlink_clear_multicast_users(net->genl_sock, grp->id); 226 __netlink_clear_multicast_users(net->genl_sock, grp->id);
226 rcu_read_unlock(); 227 rcu_read_unlock();
228 netlink_table_ungrab();
227 229
228 clear_bit(grp->id, mc_groups); 230 clear_bit(grp->id, mc_groups);
229 list_del(&grp->list); 231 list_del(&grp->list);