From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752754AbbCXKbp (ORCPT ); Tue, 24 Mar 2015 06:31:45 -0400 Received: from mail-wg0-f42.google.com ([74.125.82.42]:33518 "EHLO mail-wg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752148AbbCXKbl (ORCPT ); Tue, 24 Mar 2015 06:31:41 -0400 Message-ID: <55113D0A.2030302@gmail.com> Date: Tue, 24 Mar 2015 11:31:38 +0100 From: Patrick Marlier User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: linux-kernel@vger.kernel.org CC: "Paul E. McKenney" , Josh Triplett Subject: [PATCH 1/3] rculist: Fix list_entry_rcu to read ptr with rcu_dereference_raw Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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