From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758194Ab0DGRBr (ORCPT ); Wed, 7 Apr 2010 13:01:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49766 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758018Ab0DGRBq (ORCPT ); Wed, 7 Apr 2010 13:01:46 -0400 Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20100407162620.GA11543@linux.vnet.ibm.com> References: <20100407162620.GA11543@linux.vnet.ibm.com> To: paulmck@linux.vnet.ibm.com Cc: dhowells@redhat.com, linux-kernel@vger.kernel.org, mingo@elte.hu, laijs@cn.fujitsu.com, dipankar@in.ibm.com, akpm@linux-foundation.org, mathieu.desnoyers@polymtl.ca, josh@joshtriplett.org, dvhltc@us.ibm.com, niv@us.ibm.com, tglx@linutronix.de, peterz@infradead.org, rostedt@goodmis.org, Valdis.Kletnieks@vt.edu, eric.dumazet@gmail.com Subject: Re: [PATCH tip/urgent] rcu: add rcu_access_pointer and rcu_dereference_protected Date: Wed, 07 Apr 2010 18:00:27 +0100 Message-ID: <27310.1270659627@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Paul E. McKenney wrote: > The new rcu_access_pointer() primitive is for the case where the pointer > is be fetch and not dereferenced. This primitive may be used without > protection, RCU or otherwise, due to the fact that it uses ACCESS_ONCE(). > ... > +#define rcu_access_pointer(p, c) \ NAK. This shouldn't have the conditional parameter 'c'. Given that 'c' (by analogy to rcu_dereference_check()) is there to describe the conditions under which it's permitted to dereference the pointer, why is that relevant here? What is it you're proving? David