Thread (16 messages) 16 messages, 7 authors, 2010-02-02

Re: [PATCH] igmp: fix ip_mc_sf_allow race [v3]

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:
quoted hunk ↗ jump to hunk
@@ -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.



-- 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help