[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1364266900.18439.4.camel@cr0>
Date: Tue, 26 Mar 2013 11:01:40 +0800
From: Cong Wang <amwang@...hat.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
david.ward@...mit.edu, jorge@...2.net
Subject: Re: [PATCH net-next] 802: fix a possible race condition
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.
--
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