From: Hugh Dickins Date: Mon, 23 Apr 2007 21:41:02 +0000 (-0700) Subject: fix OOM killing processes wrongly thought MPOL_BIND X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3d124cbba316737af8f3a6959edb95bbd130a4d8;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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: Hugh Dickins Acked-by: Christoph Lameter Acked-by: William Irwin Acked-by: KAMEZAWA Hiroyuki Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/oom_kill.c b/mm/oom_kill.c index af981b645a69..3791edfffeeb 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -176,6 +176,8 @@ static inline int constrained_alloc(struct zonelist *zonelist, gfp_t gfp_mask) 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)