From: Patrick Marlier <patrick.marlier@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Josh Triplett <josh@joshtriplett.org>
Subject: [PATCH 1/3] rculist: Fix list_entry_rcu to read ptr with rcu_dereference_raw
Date: Tue, 24 Mar 2015 11:31:38 +0100 [thread overview]
Message-ID: <55113D0A.2030302@gmail.com> (raw)
Change to read effectively ptr with rcu_dereference_raw and not the
__ptr variable on the stack.
Signed-off-by: Patrick Marlier <patrick.marlier@gmail.com>
---
include/linux/rculist.h | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/include/linux/rculist.h b/include/linux/rculist.h
index a18b16f..9d9baea 100644
--- a/include/linux/rculist.h
+++ b/include/linux/rculist.h
@@ -247,10 +247,7 @@ static inline void list_splice_init_rcu(struct
list_head *list,
* primitives such as list_add_rcu() as long as it's guarded by
rcu_read_lock().
*/
#define list_entry_rcu(ptr, type, member) \
-({ \
- typeof(*ptr) __rcu *__ptr = (typeof(*ptr) __rcu __force *)ptr; \
- container_of((typeof(ptr))rcu_dereference_raw(__ptr), type, member); \
-})
+ container_of((typeof(ptr))rcu_dereference_raw(ptr), type, member)
/**
* Where are list_empty_rcu() and list_first_entry_rcu()?
--
2.1.0
next reply other threads:[~2015-03-24 10:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-24 10:31 Patrick Marlier [this message]
2015-03-25 14:30 ` [PATCH 1/3] rculist: Fix list_entry_rcu to read ptr with rcu_dereference_raw Paul E. McKenney
2015-03-25 15:01 ` Patrick Marlier
2015-03-28 10:42 ` Paul E. McKenney
2015-03-28 10:47 ` Paul E. McKenney
2015-04-13 11:39 ` Patrick Marlier
2015-04-14 20:34 ` Paul E. McKenney
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=55113D0A.2030302@gmail.com \
--to=patrick.marlier@gmail.com \
--cc=josh@joshtriplett.org \
--cc=linux-kernel@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.