[PATCH 1/4] rcu_assign_pointer: null check fix
From: Stephen Hemminger
Date: Tue Feb 12 2008 - 20:02:24 EST
Goofed on last change, should avoid barrier only on rcu_assign_pointer(p, NULL)
Signed-off-by: Stephen Hemminger <shemminger@xxxxxxxxxx>
---
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@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/