From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx190.postini.com [74.125.245.190]) by kanga.kvack.org (Postfix) with SMTP id CE4846B002B for ; Tue, 16 Oct 2012 02:10:12 -0400 (EDT) Received: by mail-pb0-f41.google.com with SMTP id rq2so6371790pbb.14 for ; Mon, 15 Oct 2012 23:10:12 -0700 (PDT) Date: Mon, 15 Oct 2012 23:10:09 -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 Tue, 16 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. > > Even though 80de7c3138ee9fd86a98696fd2cf7ad89b995d0a itself is simple. It bring > to caller complex. That's not good and have no worth. > Before: the kernel panics, all workloads cease. After: the file shows garbage, all workloads continue. This is better, in my opinion, but at best it's only a judgment call and has no effect on anything. I agree it would be better to respect the return value of mpol_to_str() since there are other possible error conditions other than a freed mempolicy, but let's not consider reverting 80de7c3138. It is obviously not a full solution to the problem, though, and we need to serialize with task_lock(). Dave, are you interested in coming up with a patch? -- 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