From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx203.postini.com [74.125.245.203]) by kanga.kvack.org (Postfix) with SMTP id 800536B002B for ; Mon, 15 Oct 2012 23:58:36 -0400 (EDT) Received: by mail-pa0-f41.google.com with SMTP id fa10so6215958pad.14 for ; Mon, 15 Oct 2012 20:58:35 -0700 (PDT) Date: Mon, 15 Oct 2012 20:58:33 -0700 (PDT) From: David Rientjes Subject: Re: mpol_to_str revisited. In-Reply-To: Message-ID: References: <20121008150949.GA15130@redhat.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org List-ID: To: KOSAKI Motohiro Cc: Dave Jones , Linux Kernel , bhutchings@solarflare.com, linux-mm@kvack.org, Linus Torvalds , Andrew Morton On Mon, 15 Oct 2012, KOSAKI Motohiro wrote: > I don't think 80de7c3138ee9fd86a98696fd2cf7ad89b995d0a is right fix. It's certainly not a complete fix, but I think it's a much better result of the race, i.e. we don't panic anymore, we simply fail the read() instead. > we should > close a race (or kill remain ref count leak) if we still have. As I mentioned earlier in the thread, the read() is done here on a task while only a reference to the task_struct is taken and we do not hold task_lock() which is required for task->mempolicy. Once that is fixed, mpol_to_str() should never be called for !task->mempolicy so it will never need to return -EINVAL in such a condition. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org