Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762851AbXEKXdt (ORCPT ); Fri, 11 May 2007 19:33:49 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754072AbXEKXdm (ORCPT ); Fri, 11 May 2007 19:33:42 -0400 Received: from smtp1.linux-foundation.org ([65.172.181.25]:49525 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756096AbXEKXdm (ORCPT ); Fri, 11 May 2007 19:33:42 -0400 Date: Fri, 11 May 2007 16:32:48 -0700 (PDT) From: Linus Torvalds To: Oleg Nesterov cc: "Rafael J. Wysocki" , Andrew Morton , Gautham R Shenoy , LKML , Pavel Machek , "Eric W. Biederman" Subject: Re: [PATCH 1/7] Freezer: Read PF_BORROWED_MM in a nonracy way In-Reply-To: <20070511232024.GA489@tv-sign.ru> Message-ID: References: <200705110035.32229.rjw@sisk.pl> <200705110036.26617.rjw@sisk.pl> <20070511123959.190adfaf.akpm@linux-foundation.org> <200705112240.54304.rjw@sisk.pl> <20070511232024.GA489@tv-sign.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 789 Lines: 22 On Sat, 12 May 2007, Oleg Nesterov wrote: > > without task_lock() we can see "p->mm != NULL" but not PF_BORROWED_MM. Let me explain it one more time: - shouldn't the *caller* protect this? Afaik, there's two situations: - either things don't change (in which case you don't need locking at all, since things are statically one way or the other) - or things change (in which case the caller can't rely on the return value anyway, since they might change *after* you release the lock) ie what's up? Is there a third case? Linus - 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/