Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752590AbZDXEdf (ORCPT ); Fri, 24 Apr 2009 00:33:35 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756767AbZDXEcT (ORCPT ); Fri, 24 Apr 2009 00:32:19 -0400 Received: from extu-mxob-1.symantec.com ([216.10.194.28]:42254 "EHLO extu-mxob-1.symantec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756595AbZDXEcS (ORCPT ); Fri, 24 Apr 2009 00:32:18 -0400 Date: Fri, 24 Apr 2009 05:29:51 +0100 (BST) From: Hugh Dickins X-X-Sender: hugh@blonde.anvils To: Oleg Nesterov cc: Linus Torvalds , Al Viro , Andrew Morton , Joe Malicki , Michael Itz , Kenneth Baker , Chris Wright , David Howells , Alexey Dobriyan , Greg Kroah-Hartman , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Roland McGrath Subject: Re: [PATCH 2/2] check_unsafe_exec: s/lock_task_sighand/rcu_read_lock/ In-Reply-To: <20090423230245.GB31302@redhat.com> Message-ID: References: <20090401023849.GW28946@ZenIV.linux.org.uk> <20090401030339.GX28946@ZenIV.linux.org.uk> <20090406153127.GA21220@redhat.com> <20090421161006.GC5402@redhat.com> <20090421171530.GA12014@redhat.com> <20090423230245.GB31302@redhat.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 612 Lines: 17 On Fri, 23 Apr 2009, Oleg Nesterov wrote: > write_lock(&p->fs->lock); > - lock_task_sighand(p, &flags); > + rcu_read_lock(); > for (t = next_thread(p); t != p; t = next_thread(t)) { > if (t->fs == p->fs) > n_fs++; > } > + rcu_read_lock(); Not quite! if second rcu_read_lock() changed to rcu_read_unlock(), then Acked-by: Hugh Dickins -- 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/