From 8ac818d418068105623e43bbd289d9553c182e6c Mon Sep 17 00:00:00 2001 From: Patrick Marlier Date: Tue, 24 Mar 2015 11:16:55 +0100 Subject: [PATCH 1/3] rculist: Fix list_entry_rcu to read ptr with rcu_dereference_raw Change to read effectively ptr with rcu_dereference_raw and not the __ptr variable on the stack. Signed-off-by: Patrick Marlier --- 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