Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762275AbZLKWBU (ORCPT ); Fri, 11 Dec 2009 17:01:20 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1761488AbZLKWBP (ORCPT ); Fri, 11 Dec 2009 17:01:15 -0500 Received: from e6.ny.us.ibm.com ([32.97.182.146]:33944 "EHLO e6.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761503AbZLKWBO (ORCPT ); Fri, 11 Dec 2009 17:01:14 -0500 Date: Fri, 11 Dec 2009 14:01:17 -0800 From: "Paul E. McKenney" To: Arnd Bergmann Cc: Thomas Gleixner , LKML , Dipankar Sarma , Ingo Molnar , Peter Zijlstra , Oleg Nesterov , Al Viro , James Morris , David Howells , Andrew Morton , Linus Torvalds , Randy Dunlap , Vegard Nossum Subject: Re: [patch 8/9] Documentation: Fix invalid rcu assumptions Message-ID: <20091211220117.GE6803@linux.vnet.ibm.com> Reply-To: paulmck@linux.vnet.ibm.com References: <20091210001308.247025548@linutronix.de> <20091210004703.308396881@linutronix.de> <200912112128.25954.arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200912112128.25954.arnd@arndb.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 Content-Length: 1464 Lines: 30 On Fri, Dec 11, 2009 at 09:28:25PM +0000, Arnd Bergmann wrote: > On Thursday 10 December 2009 00:53:26 Thomas Gleixner wrote: > > Index: linux-2.6-tip/Documentation/credentials.txt > > =================================================================== > > --- linux-2.6-tip.orig/Documentation/credentials.txt > > +++ linux-2.6-tip/Documentation/credentials.txt > > @@ -408,9 +408,6 @@ This should be used inside the RCU read > > ... > > } > > > > -A function need not get RCU read lock to use __task_cred() if it is holding a > > -spinlock at the time as this implicitly holds the RCU read lock. > > - > > Should it be necessary to hold another task's credentials for a long period of > > time, and possibly to sleep whilst doing so, then the caller should get a > > reference on them using: > > How about changing the documentation to explain why you can't just use a spinlock > or local_irq_disable instead of rcu_read_lock? You explained it well in your > [patch 0/9], but that part had not occurred to me yet and having it in the kernel > sources might prevent more people from getting it wrong in the future. That does make a lot of sense... Will add that in. Thanx, Paul -- 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/