netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: David Miller <davem@davemloft.net>
Cc: hch@lst.de, netdev@vger.kernel.org
Subject: Re: [PATCH 1/5] net: remove bogus RCU annotations on socket.wq
Date: Mon, 30 Jul 2018 09:44:54 +0200	[thread overview]
Message-ID: <20180730074454.GA10461@lst.de> (raw)
In-Reply-To: <20180729.130551.870321755786430124.davem@davemloft.net>

On Sun, Jul 29, 2018 at 01:05:51PM -0700, David Miller wrote:
> From: Christoph Hellwig <hch@lst.de>
> Date: Fri, 27 Jul 2018 16:02:10 +0200
> 
> > We never use RCU protection for it, just a lot of cargo-cult
> > rcu_deference_protects calls.
> > 
> > Note that we do keep the kfree_rcu call for it, as the references through
> > struct sock are RCU protected and thus might require a grace period before
> > freeing.
> > 
> > Signed-off-by: Christoph Hellwig <hch@lst.de>
> 
> These were added by Eric Dumazet and I would never accuse him of cargo
> cult programming.
> 
> All of the rcu_dereference_protects() calls are legit, even though some
> of them use '1' as the protects condition because in fact we know the
> object is dead and gone through an RCU cycle at that point.

I disagree, but I'll resend it the patch with Eric and Paul in CC to
settle the argument.

  reply	other threads:[~2018-07-30  9:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-27 14:02 socket poll related cleanups Christoph Hellwig
2018-07-27 14:02 ` [PATCH 1/5] net: remove bogus RCU annotations on socket.wq Christoph Hellwig
2018-07-29 20:05   ` David Miller
2018-07-30  7:44     ` Christoph Hellwig [this message]
2018-07-30 16:09       ` David Miller
2018-07-27 14:02 ` [PATCH 2/5] net: simplify sock_poll_wait Christoph Hellwig
2018-07-27 14:02 ` [PATCH 3/5] net: don not detour through struct sock to find the poll waitqueue Christoph Hellwig
2018-07-27 14:02 ` [PATCH 4/5] net: remove sock_poll_busy_loop Christoph Hellwig
2018-07-27 14:02 ` [PATCH 5/5] net: remove sock_poll_busy_flag Christoph Hellwig

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=20180730074454.GA10461@lst.de \
    --to=hch@lst.de \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.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 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).