From: Eric Dumazet <eric.dumazet@gmail.com>
To: Flavio Leitner <fleitner@redhat.com>
Cc: netdev@vger.kernel.org, David Miller <davem@davemloft.net>,
David Stevens <dlstevens@us.ibm.com>
Subject: Re: [PATCH] igmp: fix ip_mc_sf_allow race [v3]
Date: Tue, 05 Jan 2010 23:36:47 +0100 [thread overview]
Message-ID: <4B43BEFF.3030401@gmail.com> (raw)
In-Reply-To: <1262724742-5232-1-git-send-email-fleitner@redhat.com>
Le 05/01/2010 21:52, Flavio Leitner a écrit :
> Almost all igmp functions accessing inet->mc_list are protected by
> rtnl_lock(), but there is one exception which is ip_mc_sf_allow(),
> so there is a chance of either ip_mc_drop_socket or ip_mc_leave_group
> remove an entry while ip_mc_sf_allow is running causing a crash.
>
> Signed-off-by: Flavio Leitner <fleitner@redhat.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Small notes : in ip_mc_drop_socket()
// rcu_read_lock()/unlock() seems not really needed here, we only want to avoid
//the fill rtnlçlock() in case this socket have a NULL mc_list.
rcu_read_lock();
if (rcu_dereference(inet->mc_list) == NULL) {
rcu_read_unlock();
return;
}
rcu_read_unlock();
rtnl_lock();
while ((iml = rcu_dereference(inet->mc_list)) != NULL) {
rcu_dereference() is not really needed here, since you own RTNL
next prev parent reply other threads:[~2010-01-05 22:37 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-30 14:23 [PATCH] igmp: fix ip_mc_sf_allow race Flavio Leitner
2010-01-04 5:54 ` David Miller
2010-01-04 11:29 ` Flavio Leitner
2010-01-04 13:07 ` Eric Dumazet
2010-01-04 18:51 ` Flavio Leitner
2010-01-04 19:53 ` Eric Dumazet
2010-01-05 0:06 ` David Stevens
2010-01-05 6:55 ` Eric Dumazet
2010-01-05 20:52 ` [PATCH] igmp: fix ip_mc_sf_allow race [v3] Flavio Leitner
2010-01-05 22:36 ` Eric Dumazet [this message]
2010-01-05 23:03 ` Stephen Hemminger
2010-01-06 16:40 ` Paul E. McKenney
2010-01-06 17:10 ` Stephen Hemminger
2010-01-06 18:50 ` Paul E. McKenney
2010-01-28 16:13 ` [PATCH] igmp: fix ip_mc_sf_allow race [v5] Flavio Leitner
2010-02-02 15:32 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B43BEFF.3030401@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=dlstevens@us.ibm.com \
--cc=fleitner@redhat.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.