]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
fix OOM killing processes wrongly thought MPOL_BIND
authorHugh Dickins <hugh@veritas.com>
Mon, 23 Apr 2007 21:41:02 +0000 (14:41 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 2 May 2007 00:06:00 +0000 (17:06 -0700)
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 <hugh@veritas.com>
Acked-by: Christoph Lameter <clameter@sgi.com>
Acked-by: William Irwin <bill.irwin@oracle.com>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
mm/oom_kill.c

index 2f3916986abf7054bc00e4c2fc8ed2ed688d199b..223add31d2edee052363b5df7491fa38015d9fe1 100644 (file)
@@ -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)