login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
February
»
12
Re: [PATCH] fib_trie: rcu_assign_pointer warning fix
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Jarek Poplawski <jarkao2@...>
To: David Miller <davem@...>
Cc: <shemminger@...>, <paulmck@...>, <netdev@...>, <linux-kernel@...>
Subject:
Re: [PATCH] fib_trie: rcu_assign_pointer warning fix
Date: Tuesday, February 12, 2008 - 4:57 am
On 12-02-2008 02:16, David Miller wrote:
quoted text
> From: Stephen Hemminger <shemminger@vyatta.com> > Date: Mon, 11 Feb 2008 16:59:54 -0800 > > linux-kernel added to CC:, any change to generic kernel infrastructure > should be posted there > >> Eliminate warnings when rcu_assign_pointer is used with unsigned long. >> It is reasonable to use RCU with non-pointer values so allow it for general >> use. Add a comment to explain the if test. >> >> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> >> --- >> include/linux/rcupdate.h | 13 +++++++------ >> 1 files changed, 7 insertions(+), 6 deletions(-) >> >> diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h >> index 37a642c..c44ac87 100644 >> --- a/include/linux/rcupdate.h >> +++ b/include/linux/rcupdate.h >> @@ -172,14 +172,15 @@ struct rcu_head { >> * structure after the pointer assignment. More importantly, this >> * call documents which pointers will be dereferenced by RCU read-side >> * code. >> + * >> + * If value is the NULL (constant 0), then no barrier is needed. >> */ >> >> -#define rcu_assign_pointer(p, v) \ >> - ({ \ >> - if (!__builtin_constant_p(v) || \ >> - ((v) != NULL)) \ >> - smp_wmb(); \ >> - (p) = (v); \ >> +#define rcu_assign_pointer(p, v) \ >> + ({ \ >> + if (!(__builtin_constant_p(v) && v)) \
...But, "If value is the NULL (constant 0)" we have: if (!(1 && NULL != 0)) ==> if (!(0)) and the barrier is used?!
quoted text
>> + smp_wmb(); \ >> + (p) = (v); \ >> }) >> >> /**
Regards, Jarek P. --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
Re: [PATCH] fib_trie: rcu_assign_pointer warning fix
, David Miller
, (Mon Feb 11, 9:16 pm)
Re: [PATCH] fib_trie: rcu_assign_pointer warning fix
, Jarek Poplawski
, (Tue Feb 12, 4:57 am)
Re: [PATCH] fib_trie: rcu_assign_pointer warning fix
, Paul E. McKenney
, (Tue Feb 12, 12:07 pm)
Re: [PATCH] fib_trie: rcu_assign_pointer warning fix
, Jarek Poplawski
, (Tue Feb 12, 3:32 pm)
Re: [PATCH] fib_trie: rcu_assign_pointer warning fix
, Jarek Poplawski
, (Tue Feb 12, 3:46 pm)
Re: [PATCH] fib_trie: rcu_assign_pointer warning fix
, Paul E. McKenney
, (Wed Feb 13, 6:55 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Davide Libenzi
[patch 7/8] fdmap v2 - implement sys_socket2
Benjamin Herrenschmidt
Re: [PATCH] Remove process freezer from suspend to RAM pathway
Greg Kroah-Hartman
[PATCH 011/196] sysfs: Fix a copy-n-paste typo in comment
Greg KH
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
linux-netdev
:
Jarek Poplawski
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Gerrit Renker
[PATCH 0/37] dccp: Feature negotiation - last call for comments
Rémi Denis-Courmont
[PATCH] USB host CDC Phonet network interface driver
David Miller
[GIT]: Networking
git
:
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
3 users
and
698 guests
online.
Online users
emecepao
sashasmithson
Jeremy
Syndicate