From: "Rémi Denis-Courmont" <remi@remlab.net>
To: paulmck@linux.vnet.ibm.com
Cc: netdev@vger.kernel.org,
"Rémi Denis-Courmont" <remi.denis-courmont@nokia.com>
Subject: Re: [PATCH net-next 1/2] Phonet: put protocols array under RCU
Date: Mon, 16 Nov 2009 19:34:00 +0200 [thread overview]
Message-ID: <200911161934.00365.remi@remlab.net> (raw)
In-Reply-To: <20091116172617.GC6746@linux.vnet.ibm.com>
Le lundi 16 novembre 2009 19:26:17 Paul E. McKenney, vous avez écrit :
> On Fri, Nov 13, 2009 at 05:01:18PM +0200, Rémi Denis-Courmont wrote:
> > From: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
> >
> > Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
> > ---
> > net/phonet/af_phonet.c | 20 +++++++++++---------
> > 1 files changed, 11 insertions(+), 9 deletions(-)
> >
> > diff --git a/net/phonet/af_phonet.c b/net/phonet/af_phonet.c
> > index 8d3a55b..ed65da2 100644
> > --- a/net/phonet/af_phonet.c
> > +++ b/net/phonet/af_phonet.c
> > @@ -35,7 +35,6 @@
> >
> > /* Transport protocol registration */
> > static struct phonet_protocol *proto_tab[PHONET_NPROTO] __read_mostly;
> > -static DEFINE_SPINLOCK(proto_tab_lock);
> >
> > static struct phonet_protocol *phonet_proto_get(int protocol)
> > {
> > @@ -44,11 +43,11 @@ static struct phonet_protocol *phonet_proto_get(int
> > protocol) if (protocol >= PHONET_NPROTO)
> > return NULL;
> >
> > - spin_lock(&proto_tab_lock);
> > + rcu_read_lock();
> > pp = proto_tab[protocol];
>
> Don't we need an rcu_dereference() in here somewhere?
>
> Perhaps something like the following?
Err yes, we do.
--
Rémi Denis-Courmont
http://www.remlab.net/
prev parent reply other threads:[~2009-11-16 17:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-13 15:01 [PATCH net-next 1/2] Phonet: put protocols array under RCU Rémi Denis-Courmont
2009-11-13 15:01 ` [PATCH net-next 2/2] Phonet: convert routing table to RCU Rémi Denis-Courmont
2009-11-14 4:51 ` David Miller
2009-11-14 4:51 ` [PATCH net-next 1/2] Phonet: put protocols array under RCU David Miller
2009-11-16 17:26 ` Paul E. McKenney
2009-11-16 17:34 ` Rémi Denis-Courmont [this message]
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=200911161934.00365.remi@remlab.net \
--to=remi@remlab.net \
--cc=netdev@vger.kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=remi.denis-courmont@nokia.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 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).