Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754154AbbELWqh (ORCPT ); Tue, 12 May 2015 18:46:37 -0400 Received: from e35.co.us.ibm.com ([32.97.110.153]:37624 "EHLO e35.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753877AbbELWqg (ORCPT ); Tue, 12 May 2015 18:46:36 -0400 From: "Paul E. McKenney" To: linux-kernel@vger.kernel.org Cc: mingo@kernel.org, laijs@cn.fujitsu.com, dipankar@in.ibm.com, akpm@linux-foundation.org, mathieu.desnoyers@efficios.com, josh@joshtriplett.org, tglx@linutronix.de, peterz@infradead.org, rostedt@goodmis.org, dhowells@redhat.com, edumazet@google.com, dvhart@linux.intel.com, fweisbec@gmail.com, oleg@redhat.com, bobby.prani@gmail.com, Patrick Marlier , "Paul E. McKenney" Subject: [PATCH tip/core/rcu 2/4] rculist: Fix list_entry_rcu to read ptr with rcu_dereference_raw Date: Tue, 12 May 2015 15:46:25 -0700 Message-Id: <1431470787-4702-2-git-send-email-paulmck@linux.vnet.ibm.com> X-Mailer: git-send-email 1.8.1.5 In-Reply-To: <1431470787-4702-1-git-send-email-paulmck@linux.vnet.ibm.com> References: <20150512224603.GA4531@linux.vnet.ibm.com> <1431470787-4702-1-git-send-email-paulmck@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15051222-0013-0000-0000-00000AB43951 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1279 Lines: 35 From: Patrick Marlier Change to read effectively ptr with rcu_dereference_raw and not the __ptr variable on the stack. Signed-off-by: Patrick Marlier Signed-off-by: Paul E. McKenney --- 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 17c6b1f84a77..c881741fbacd 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()? -- 1.8.1.5 -- 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/