[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1271068737.16881.18.camel@edumazet-laptop>
Date: Mon, 12 Apr 2010 12:38:57 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: Cong Wang <amwang@...hat.com>
Cc: Stephen Hemminger <shemminger@...ux-foundation.org>,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
bridge@...ts.linux-foundation.org,
Andy Gospodarek <gospo@...hat.com>,
Neil Horman <nhorman@...driver.com>,
Jeff Moyer <jmoyer@...hat.com>, Matt Mackall <mpm@...enic.com>,
bonding-devel@...ts.sourceforge.net,
Jay Vosburgh <fubar@...ibm.com>,
David Miller <davem@...emloft.net>
Subject: Re: [v3 Patch 2/3] bridge: make bridge support netpoll
Le lundi 12 avril 2010 à 18:37 +0800, Cong Wang a écrit :
> Stephen Hemminger wrote:
> > There is no protection on dev->priv_flags for SMP access.
> > It would better bit value in dev->state if you are using it as control flag.
> >
> > Then you could use
> > if (unlikely(test_and_clear_bit(__IN_NETPOLL, &skb->dev->state)))
> > netpoll_send_skb(...)
> >
> >
>
> Hmm, I think we can't use ->state here, it is not for this kind of purpose,
> according to its comments.
>
> Also, I find other usages of IFF_XXX flags of ->priv_flags are also using
> &, | to set or clear the flags. So there must be some other things preventing
> the race...
Yes, its RTNL that protects priv_flags changes, hopefully...
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists