Re: [PATCH] igmp: fix ip_mc_sf_allow race [v3]
From: Stephen Hemminger <hidden>
Date: 2010-01-05 23:03:32
From: Stephen Hemminger <hidden>
Date: 2010-01-05 23:03:32
On Tue, 5 Jan 2010 18:52:22 -0200 Flavio Leitner [off-list ref] wrote:
@@ -2245,13 +2269,17 @@ void ip_mc_drop_socket(struct sock *sk) struct ip_mc_socklist *iml; struct net *net = sock_net(sk); - if (inet->mc_list == NULL) + rcu_read_lock(); + if (rcu_dereference(inet->mc_list) == NULL) { + rcu_read_unlock(); return; + } + rcu_read_unlock(); rtnl_lock(); - while ((iml = i
All this would be cleaner if mc_list was using list_head and the existing list_head_rcu stuff. --