All of 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>, GOTO <y-goto@jp.fujitsu.com>,
	Christoph Lameter <clameter@engr.sgi.com>,
	Andrew Morton <akpm@osdl.org>
Subject: Re: [2.6.20][PATCH] fix mempolicy error check on a system with memory-less-node
Date: Tue, 6 Feb 2007 09:26:53 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0702060925130.9812@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <20070206202312.4f979bcf.kamezawa.hiroyu@jp.fujitsu.com>

On Tue, 6 Feb 2007, KAMEZAWA Hiroyuki wrote:

> This means an access to NULL,here.
> ==
> unsigned slab_node(struct mempolicy *policy)
> {
>         case MPOL_BIND:
>                 /*
>                  * Follow bind policy behavior and start allocation at the
>                  * first node.
>                  */
>                 return zone_to_nid(policy->v.zonelist->zones[0]);
> }
> ==
> length of this zonelist was 0.
> It seems fixing a NULL access here is also O.K. 
> This patch is just an idea.

Hmmm... Remove the node from the node_online_map instead?

>  	}
> -	return nodes_subset(*nodes, node_online_map) ? 0 : -EINVAL;
> +	nodes_clear(node_with_memory);
> +	for_each_online_node(nd) {
> +		if (node_present_pages(nd))
> +			node_set(nd, node_with_memory);
> +	}
> +	return nodes_subset(*nodes, node_with_memory) ? 0 : -EINVAL;
>  }

Uhh. No loops here please. If we really need this then we need to have 
some sort of set operation here.



  reply	other threads:[~2007-02-06 17:27 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-06 11:23 [2.6.20][PATCH] fix mempolicy error check on a system with memory-less-node KAMEZAWA Hiroyuki
2007-02-06 17:26 ` Christoph Lameter [this message]
2007-02-07  1:14   ` KAMEZAWA Hiroyuki
2007-02-07  8:04     ` Christoph Lameter
2007-02-07  8:36       ` KAMEZAWA Hiroyuki
2007-02-07  8:36         ` [2.6.20][PATCH] fix mempolicy error check on a system with KAMEZAWA Hiroyuki
2007-02-08 11:49         ` [2.6.20][PATCH] fix mempolicy error check on a system with memory-less-node Bob Picco
2007-02-08 11:49           ` Bob Picco
2007-02-07 10:20       ` Andi Kleen
2007-02-07 10:20 ` Andi Kleen
2007-02-07 10:07   ` KAMEZAWA Hiroyuki
2007-02-07 10:19     ` Andi Kleen
2007-02-07 10:37       ` KAMEZAWA Hiroyuki
2007-02-07 10:41         ` Andi Kleen
2007-02-07 10:49           ` KAMEZAWA Hiroyuki
2007-02-07 11:32             ` Andi Kleen
2007-02-07 12:27               ` KAMEZAWA Hiroyuki
2007-02-07 14:05     ` Christoph Lameter
2007-02-07 15:28       ` KAMEZAWA Hiroyuki
2007-02-07 14:03   ` Christoph Lameter
2007-02-07 16:23   ` Andrew Morton
2007-02-07 16:50     ` Andi Kleen
2007-02-07 17:43       ` Andrew Morton
2007-02-07 18:15         ` [PATCH] FS : Speedup rw_verify_area() Eric Dumazet
2007-02-08  0:37         ` [2.6.20][PATCH] fix mempolicy error check on a system with memory-less-node KAMEZAWA Hiroyuki
2007-02-08 19:09         ` Christoph Lameter
2007-02-08 19:26           ` Andrew Morton
2007-02-08 19:35             ` Christoph Lameter

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.0702060925130.9812@schroedinger.engr.sgi.com \
    --to=clameter@sgi.com \
    --cc=akpm@osdl.org \
    --cc=clameter@engr.sgi.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=y-goto@jp.fujitsu.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.