[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1275491722.2725.184.camel@edumazet-laptop>
Date: Wed, 02 Jun 2010 17:15:22 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: Stephen Hemminger <shemminger@...tta.com>
Cc: Jiri Pirko <jpirko@...hat.com>, netdev@...r.kernel.org,
davem@...emloft.net, kaber@...sh.net,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Subject: Re: [PATCH net-next-2.6] net: replace hooks in __netif_receive_skb
V5
Le mercredi 02 juin 2010 à 08:07 -0700, Stephen Hemminger a écrit :
> On Wed, 2 Jun 2010 09:52:08 +0200
> Jiri Pirko <jpirko@...hat.com> wrote:
>
> > +
> > + err = netdev_rx_handler_register(dev, macvlan_handle_frame);
> > + if (err) {
> > + rcu_assign_pointer(dev->macvlan_port, NULL);
> > + kfree(port);
> > + }
> > +
> > + return err;
> > }
>
> Rcu assign is not necessary here for because the hook didn't
> get registered so there is no way for other CPU to see it.
>
Thats a valid point, but we should use it, and not care of this litle
detail. Compiler generates same code anyway, since NULL value is tested
by rcu_assign_pointer().
If we dont use rcu_assign_pointer() ourself, Paul or Arnd will put it
one day or another :)
http://lkml.org/lkml/2010/6/1/290
--
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