Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262623AbVCVK44 (ORCPT ); Tue, 22 Mar 2005 05:56:56 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262625AbVCVK44 (ORCPT ); Tue, 22 Mar 2005 05:56:56 -0500 Received: from mx1.elte.hu ([157.181.1.137]:947 "EHLO mx1.elte.hu") by vger.kernel.org with ESMTP id S262623AbVCVK4y (ORCPT ); Tue, 22 Mar 2005 05:56:54 -0500 Date: Tue, 22 Mar 2005 11:56:40 +0100 From: Ingo Molnar To: Esben Nielsen Cc: "Paul E. McKenney" , dipankar@in.ibm.com, shemminger@osdl.org, akpm@osdl.org, torvalds@osdl.org, rusty@au1.ibm.com, tgall@us.ibm.com, jim.houston@comcast.net, manfred@colorfullife.com, gh@us.ibm.com, linux-kernel@vger.kernel.org Subject: Re: Real-Time Preemption and RCU Message-ID: <20050322105640.GA28861@elte.hu> References: <20050318171929.GC30310@elte.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-ELTE-SpamVersion: MailScanner 4.31.6-itk1 (ELTE 1.2) SpamAssassin 2.63 ClamAV 0.73 X-ELTE-VirusStatus: clean X-ELTE-SpamCheck: no X-ELTE-SpamCheck-Details: score=-4.9, required 5.9, autolearn=not spam, BAYES_00 -4.90 X-ELTE-SpamLevel: X-ELTE-SpamScore: -4 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 576 Lines: 19 * Esben Nielsen wrote: > +static inline void rcu_read_lock(void) > +{ > + preempt_disable(); > + __get_cpu_var(rcu_data).active_readers++; > + preempt_enable(); > +} this is buggy. Nothing guarantees that we'll do the rcu_read_unlock() on the same CPU, and hence ->active_readers can get out of sync. Ingo - 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/