From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753108AbZK3S31 (ORCPT ); Mon, 30 Nov 2009 13:29:27 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752791AbZK3S30 (ORCPT ); Mon, 30 Nov 2009 13:29:26 -0500 Received: from e8.ny.us.ibm.com ([32.97.182.138]:40970 "EHLO e8.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752743AbZK3S30 (ORCPT ); Mon, 30 Nov 2009 13:29:26 -0500 Date: Mon, 30 Nov 2009 10:29:29 -0800 From: "Paul E. McKenney" To: Nick Piggin Cc: Linus Torvalds , Linux Kernel Mailing List Subject: Re: [rfc] "fair" rw spinlocks Message-ID: <20091130182929.GD6762@linux.vnet.ibm.com> Reply-To: paulmck@linux.vnet.ibm.com References: <20091123145409.GA29627@wotan.suse.de> <20091130075557.GI17484@wotan.suse.de> <20091130154031.GE21639@wotan.suse.de> <20091130163923.GC6762@linux.vnet.ibm.com> <20091130171333.GG21639@wotan.suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091130171333.GG21639@wotan.suse.de> User-Agent: Mutt/1.5.15+20070412 (2007-04-11) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 30, 2009 at 06:13:33PM +0100, Nick Piggin wrote: > On Mon, Nov 30, 2009 at 09:05:57AM -0800, Linus Torvalds wrote: > Secondly: > > > static void tasklist_read_lock(void) > > { > > preempt_disable(); > > if (!current->tasklist_count++) > > What happens if an interrupt and nested tasklist_read_lock() happens > here? Ouch!!! This race affects the reader-writer-lock version as well. Ah well, looks like interrupt disabling is required either way. Thanx, Paul