netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cong Wang <amwang@redhat.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: David Miller <davem@davemloft.net>,
	netdev@vger.kernel.org, david.ward@ll.mit.edu, jorge@dti2.net
Subject: Re: [PATCH net-next] 802: fix a possible race condition
Date: Tue, 26 Mar 2013 11:01:40 +0800	[thread overview]
Message-ID: <1364266900.18439.4.camel@cr0> (raw)
In-Reply-To: <1364220527.29473.15.camel@edumazet-glaptop>

On Mon, 2013-03-25 at 07:08 -0700, Eric Dumazet wrote:
> On Mon, 2013-03-25 at 21:32 +0800, Cong Wang wrote:
> 
> > At least garp_join_timer() calls garp_pdu_queue() in a timer:
> > 
> > static void garp_join_timer(unsigned long data)
> > {
> >         struct garp_applicant *app = (struct garp_applicant *)data;
> > 
> >         spin_lock(&app->lock);
> >         garp_gid_event(app, GARP_EVENT_TRANSMIT_PDU);
> >         garp_pdu_queue(app);
> >         spin_unlock(&app->lock);
> > 
> >         garp_queue_xmit(app);
> >         garp_join_timer_arm(app);
> > }
> > 
> > which I don't think can hold RTNL lock possibly.
> > 
> 
> But timer wont possibly run because of the previous :
> 
> del_timer_sync(&app->join_timer);

Yeah, but in the following callchain:

garp_pdu_rcv() -> garp_pdu_parse_msg() -> garp_pdu_parse_attr() ->
garp_gid_event()

the race can happen too as garp_pdu_rcv() is called in BH context.

  reply	other threads:[~2013-03-26  3:02 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-22  7:50 [Patch net-next] ip_gre: increase inner ip header ID during segmentation Cong Wang
2013-03-22  7:57 ` Cong Wang
2013-03-22 10:31 ` [PATCH net-next 1/2] " Cong Wang
2013-03-22 10:31   ` [PATCH net-next 2/2] udp: " Cong Wang
2013-03-22 14:24     ` David Miller
2013-03-22 14:24   ` [PATCH net-next 1/2] ip_gre: " David Miller
2013-03-22 17:12   ` Pravin Shelar
2013-03-23  3:25     ` Cong Wang
2013-03-23  5:14 ` [PATCH net-next] 8021q: fix a potential use-after-free Cong Wang
2013-03-23  5:14   ` [PATCH net-next] 802: fix a possible race condition Cong Wang
2013-03-24 21:24     ` David Miller
2013-03-25 13:32       ` Cong Wang
2013-03-25 14:08         ` Eric Dumazet
2013-03-26  3:01           ` Cong Wang [this message]
2013-03-23 15:16   ` [PATCH net-next] 8021q: fix a potential use-after-free Eric Dumazet
2013-03-24 21:27   ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2013-04-03  7:52 [PATCH net-next] 802: fix a possible race condition Cong Wang
2013-04-07 21:04 ` 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=1364266900.18439.4.camel@cr0 \
    --to=amwang@redhat.com \
    --cc=davem@davemloft.net \
    --cc=david.ward@ll.mit.edu \
    --cc=eric.dumazet@gmail.com \
    --cc=jorge@dti2.net \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).