All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: paulmck@linux.vnet.ibm.com
Cc: dim@openvz.org, netdev@vger.kernel.org
Subject: Re: What protects rcu_dereference() in __sk_free()?
Date: Sat, 16 Jan 2010 09:55:34 +0100	[thread overview]
Message-ID: <4B517F06.5000008@gmail.com> (raw)
In-Reply-To: <20100115195153.GA6188@linux.vnet.ibm.com>

Le 15/01/2010 20:51, Paul E. McKenney a écrit :
> 
> Thank you for the info, Eric!
> 
> One option would be to remove the rcu_dereference() from __sk_free().
> Given that it was there, my thought would be to make it read as follows:
> 
> 	filter = rcu_dereference_check(sk->sk_filter,
> 				       atomic_read(&sk->sk_wmem_alloc) == 0);
> 
> This approach would have the benefit of potentially catching some race
> conditions if built with CONFIG_PROVE_RCU.  Does this seem reasonable to
> you?

Thats a good suggestion, this documents the thing with no runtime cost.

Thanks

      reply	other threads:[~2010-01-16  8:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-14 18:41 What protects rcu_dereference() in __sk_free()? Paul E. McKenney
2010-01-15  5:59 ` Eric Dumazet
2010-01-15 19:51   ` Paul E. McKenney
2010-01-16  8:55     ` Eric Dumazet [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=4B517F06.5000008@gmail.com \
    --to=eric.dumazet@gmail.com \
    --cc=dim@openvz.org \
    --cc=netdev@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.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.