LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Christoph Lameter <clameter@sgi.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>, Andi Kleen <ak@suse.de>,
	GOTO <y-goto@jp.fujitsu.com>
Subject: Re: Fw: [BUG][PATCH] fix mempolcy's check on a system with memory-less-node take3
Date: Thu, 8 Feb 2007 11:28:30 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0702081125160.11045@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <20070208173608.c31c2e13.kamezawa.hiroyu@jp.fujitsu.com>

On Thu, 8 Feb 2007, KAMEZAWA Hiroyuki wrote:

> @@ -162,6 +162,10 @@
>  			break;
>  		k--;
>  	}
> +	if (!num) {
> +		kfree(zl);
> +		return ERR_PTR(-EINVAL);
> +	}
>  	zl->zones[num] = NULL;
>  	return zl;
>  }

Ok. So you are detecting a set of nodes that has nodes specified but the 
zones that these nodes refer to are empty,  as an error.

Should work.

> @@ -193,9 +197,11 @@
>  		break;
>  	case MPOL_BIND:
>  		policy->v.zonelist = bind_zonelist(nodes);
> -		if (policy->v.zonelist == NULL) {
> +		if (IS_ERR(policy->v.zonelist)) {
> +			void *val = policy->v.zonelist;
> +			policy->v.zonelist = NULL;

void *? Ahh. It takes the error code.

Looks good. But if we are really going down this road of memory-less 
nodes we may want to audit the kernel for other issues.

Could you run a series of tests on that machine?


  reply	other threads:[~2007-02-08 19:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-08  8:36 KAMEZAWA Hiroyuki
2007-02-08 19:28 ` Christoph Lameter [this message]
2007-02-09  0:39   ` KAMEZAWA Hiroyuki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0702081125160.11045@schroedinger.engr.sgi.com \
    --to=clameter@sgi.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=y-goto@jp.fujitsu.com \
    --subject='Re: Fw: [BUG][PATCH] fix mempolcy'\''s check on a system with memory-less-node take3' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).