All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Stephen Hemminger <shemminger@vyatta.com>
Cc: Jiri Pirko <jpirko@redhat.com>,
	netdev@vger.kernel.org, davem@davemloft.net, kaber@trash.net,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Subject: Re: [PATCH net-next-2.6] net: replace hooks in __netif_receive_skb V5
Date: Wed, 02 Jun 2010 17:15:22 +0200	[thread overview]
Message-ID: <1275491722.2725.184.camel@edumazet-laptop> (raw)
In-Reply-To: <20100602080730.53abea6d@nehalam>

Le mercredi 02 juin 2010 à 08:07 -0700, Stephen Hemminger a écrit :
> On Wed, 2 Jun 2010 09:52:08 +0200
> Jiri Pirko <jpirko@redhat.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




  reply	other threads:[~2010-06-02 15:15 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-27 18:08 [PATCH net-next-2.6] net: replace hooks in __netif_receive_skb V2 Jiri Pirko
2010-05-27 20:08 ` Stephen Hemminger
2010-05-28  5:51   ` Jiri Pirko
2010-05-28  6:12     ` [PATCH net-next-2.6] net: replace hooks in __netif_receive_skb V3 Jiri Pirko
2010-05-28  7:02       ` Eric Dumazet
2010-05-28  7:33         ` [PATCH net-next-2.6] net: replace hooks in __netif_receive_skb V4 Jiri Pirko
2010-06-01 15:28           ` net: replace hooks in __netif_receive_skb (v4) Stephen Hemminger
2010-06-01 15:41             ` Jiri Pirko
2010-06-01 16:10               ` Stephen Hemminger
2010-06-02  7:02                 ` Jiri Pirko
2010-06-01 16:13             ` Fischer, Anna
2010-06-02  6:50               ` Jiri Pirko
2010-06-02  7:24             ` net: " Jiri Pirko
2010-06-02  7:52             ` [PATCH net-next-2.6] net: replace hooks in __netif_receive_skb V5 Jiri Pirko
2010-06-02 14:11               ` David Miller
2010-06-02 15:07               ` Stephen Hemminger
2010-06-02 15:15                 ` Eric Dumazet [this message]
2010-06-02 20:43                   ` Paul E. McKenney
2010-06-02 16:20               ` Fischer, Anna

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=1275491722.2725.184.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=jpirko@redhat.com \
    --cc=kaber@trash.net \
    --cc=netdev@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=shemminger@vyatta.com \
    /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.