From: Benjamin Poirier <bpoirier@suse.de>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: netdev@vger.kernel.org, Pablo Neira Ayuso <pablo@netfilter.org>,
Patrick McHardy <kaber@trash.net>,
"David S. Miller" <davem@davemloft.net>,
Andrew Morton <akpm@linux-foundation.org>,
Mike Frysinger <vapier@gentoo.org>, Arun Sharma <asharma@fb.com>,
netfilter-devel@vger.kernel.org, netfilter@vger.kernel.org,
coreteam@netfilter.org, linux-kernel@vger.kernel.org,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Subject: Re: [PATCH RFC 1/2] netfilter: conntrack: remove RCU usage in conntrack notifier
Date: Fri, 27 Apr 2012 16:14:59 -0400 [thread overview]
Message-ID: <20120427201459.GA31254@d2.synalogic.ca> (raw)
In-Reply-To: <1335553131.2775.252.camel@edumazet-glaptop>
On 2012/04/27 20:58, Eric Dumazet wrote:
> On Fri, 2012-04-27 at 14:28 -0400, Benjamin Poirier wrote:
> > I think that the rcu usage in this code is pointless. It should either be
> > removed or, if it was intended to protect against something, it ought to make
> > that clear.
> >
> > 1) The code does not make use of the deferred deletion/wait for completion rcu
> > api (ie. synchronize_rcu(), call_rcu()).
> > 2) It does not benefit from the barriers implied by the rcu primitives used.
> > The code deals with callback pointers. There's no need to order writes to the
> > function code (!) before writes to the function pointers here.
> > ---
>
> At a first glance, this seems pretty wrong.
>
> code can disappear under you, thats for sure.
>
> CONFIG_NF_CT_NETLINK=m
>
> hint : module unload contains an rcu barrier.
>
Thank you Eric. I had indeed failed to consider module load/unload
cases, which are effectively "writes to function code".
prev parent reply other threads:[~2012-04-27 20:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-27 18:28 [PATCH RFC 1/2] netfilter: conntrack: remove RCU usage in conntrack notifier Benjamin Poirier
2012-04-27 18:28 ` [PATCH RFC 2/2] netfilter: conntrack: replace mutex with cmpxchg Benjamin Poirier
2012-05-02 0:51 ` Pablo Neira Ayuso
2012-04-27 18:58 ` [PATCH RFC 1/2] netfilter: conntrack: remove RCU usage in conntrack notifier Eric Dumazet
2012-04-27 20:14 ` Benjamin Poirier [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=20120427201459.GA31254@d2.synalogic.ca \
--to=bpoirier@suse.de \
--cc=akpm@linux-foundation.org \
--cc=asharma@fb.com \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=kaber@trash.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=netfilter@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=vapier@gentoo.org \
/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.