From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755386Ab0IGADE (ORCPT ); Mon, 6 Sep 2010 20:03:04 -0400 Received: from fgwmail5.fujitsu.co.jp ([192.51.44.35]:52495 "EHLO fgwmail5.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755180Ab0IGADB (ORCPT ); Mon, 6 Sep 2010 20:03:01 -0400 X-SecurityPolicyCheck-FJ: OK by FujitsuOutboundMailChecker v1.3.1 From: KOSAKI Motohiro To: David Rientjes Subject: Re: [PATCH 13/14] mm: mempolicy: Check return code of check_range Cc: kosaki.motohiro@jp.fujitsu.com, Kulikov Vasiliy , kernel-janitors@vger.kernel.org, Andrew Morton , Lee Schermerhorn , Christoph Lameter , linux-kernel@vger.kernel.org, linux-mm@kvack.org In-Reply-To: References: <20100906093610.C8B5.A69D9226@jp.fujitsu.com> Message-Id: <20100907090220.C8D5.A69D9226@jp.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Becky! ver. 2.50.07 [ja] Date: Tue, 7 Sep 2010 09:02:57 +0900 (JST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Mon, 6 Sep 2010, KOSAKI Motohiro wrote: > > > > From: Vasiliy Kulikov > > > > > > Function check_range may return ERR_PTR(...). Check for it. > > > > When happen this issue? > > > > afaik, check_range return error when following condition. > > 1) mm->mmap->vm_start argument is incorrect > > 2) don't have neigher MPOL_MF_STATS, MPOL_MF_MOVE and MPOL_MF_MOVE_ALL > > > > I think both case is not happen in real. Am I overlooking anything? > > > > There's no reason not to check the return value of a function when the > implementation of either could change at any time. migrate_to_node() is > certainly not in any fastpath where we can't sacrifice a branch for more > robust code. I was not against this change. I was asking patch effectness.