From: Hugh Dickins 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: Hugh Dickins Acked-by: Christoph Lameter Acked-by: William Irwin Acked-by: KAMEZAWA Hiroyuki Cc: Signed-off-by: Andrew Morton --- mm/oom_kill.c | 2 ++ 1 file changed, 2 insertions(+) diff -puN mm/oom_kill.c~fix-oom-killing-processes-wrongly-thought-mpol_bind mm/oom_kill.c --- a/mm/oom_kill.c~fix-oom-killing-processes-wrongly-thought-mpol_bind +++ a/mm/oom_kill.c @@ -176,6 +176,8 @@ static inline int constrained_alloc(stru struct zone **z; nodemask_t nodes; int node; + + nodes_clear(nodes); /* node has memory ? */ for_each_online_node(node) if (NODE_DATA(node)->node_present_pages) _