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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux