[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100105150304.73d435da@nehalam>
Date: Tue, 5 Jan 2010 15:03:04 -0800
From: Stephen Hemminger <shemminger@...tta.com>
To: Flavio Leitner <fleitner@...hat.com>
Cc: netdev@...r.kernel.org, David Miller <davem@...emloft.net>,
David Stevens <dlstevens@...ibm.com>,
Eric Dumazet <eric.dumazet@...il.com>,
Flavio Leitner <fleitner@...hat.com>
Subject: Re: [PATCH] igmp: fix ip_mc_sf_allow race [v3]
On Tue, 5 Jan 2010 18:52:22 -0200
Flavio Leitner <fleitner@...hat.com> 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.
--
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists