netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: David Miller <davem@davemloft.net>
Cc: linux-kernel@vger.kernle.org, netdev@vger.kernel.org
Subject: [PATCH 1/4] rcu_assign_pointer: null check fix
Date: Tue, 12 Feb 2008 16:50:43 -0800	[thread overview]
Message-ID: <20080213005122.653836965@vyatta.com> (raw)
In-Reply-To: 20080213005042.150212716@vyatta.com

[-- Attachment #1: rcu-assign-warn.patch --]
[-- Type: text/plain, Size: 637 bytes --]

Goofed on last change, should avoid barrier only on rcu_assign_pointer(p, NULL)

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
 include/linux/rcupdate.h |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

--- a/include/linux/rcupdate.h	2008-02-12 14:46:49.000000000 -0800
+++ b/include/linux/rcupdate.h	2008-02-12 14:56:17.000000000 -0800
@@ -178,7 +178,7 @@ struct rcu_head {
 
 #define rcu_assign_pointer(p, v)			\
 	({						\
-		if (!(__builtin_constant_p(v) && v))	\
+		if (!__builtin_constant_p(v) || v)	\
 			smp_wmb();			\
 		(p) = (v);				\
 	})

-- 
Stephen Hemminger <shemminger@vyatta.com>


       reply	other threads:[~2008-02-13  0:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20080213005042.150212716@vyatta.com>
2008-02-13  0:50 ` Stephen Hemminger [this message]
2008-02-13  1:27   ` [PATCH 1/4] rcu_assign_pointer: null check fix David Miller
2008-02-13  8:07   ` Jarek Poplawski
2008-02-13  0:50 ` [PATCH 2/4] fib_trie: improve output format for /proc/net/fib_trie Stephen Hemminger
2008-02-13  2:28   ` Andrew Morton
2008-02-13  3:23     ` Stephen Hemminger
     [not found] ` <20080213005122.879352336@vyatta.com>
2008-02-13  1:26   ` [PATCH 4/4] hlist_for_each_entry_continue simplification David Miller

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=20080213005122.653836965@vyatta.com \
    --to=shemminger@vyatta.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernle.org \
    --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).