Commit 3d124cbb authored by Hugh Dickins's avatar Hugh Dickins Committed by Linus Torvalds

fix OOM killing processes wrongly thought MPOL_BIND

I only have CONFIG_NUMA=y for build testing: surprised when trying a memhog
to see lots of other processes killed with "No available memory
(MPOL_BIND)".  memhog is killed correctly once we initialize nodemask in
constrained_alloc().
Signed-off-by: default avatarHugh Dickins <hugh@veritas.com>
Acked-by: default avatarChristoph Lameter <clameter@sgi.com>
Acked-by: default avatarWilliam Irwin <bill.irwin@oracle.com>
Acked-by: default avatarKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: <stable@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent fdc30b3d
...@@ -176,6 +176,8 @@ static inline int constrained_alloc(struct zonelist *zonelist, gfp_t gfp_mask) ...@@ -176,6 +176,8 @@ static inline int constrained_alloc(struct zonelist *zonelist, gfp_t gfp_mask)
struct zone **z; struct zone **z;
nodemask_t nodes; nodemask_t nodes;
int node; int node;
nodes_clear(nodes);
/* node has memory ? */ /* node has memory ? */
for_each_online_node(node) for_each_online_node(node)
if (NODE_DATA(node)->node_present_pages) if (NODE_DATA(node)->node_present_pages)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment