lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0702060925130.9812@schroedinger.engr.sgi.com>
Date:	Tue, 6 Feb 2007 09:26:53 -0800 (PST)
From:	Christoph Lameter <clameter@....com>
To:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
cc:	LKML <linux-kernel@...r.kernel.org>, GOTO <y-goto@...fujitsu.com>,
	Christoph Lameter <clameter@...r.sgi.com>,
	Andrew Morton <akpm@...l.org>
Subject: Re: [2.6.20][PATCH] fix mempolicy error check on a system with
 memory-less-node

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.


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ