Re: Fw: [BUG][PATCH] fix mempolcy's check on a system withmemory-less-node take3

From: Christoph Lameter
Date: Thu Feb 08 2007 - 14:29:00 EST


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?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/