Xishi Qiu 6f25a14a70 mm: fix invalid node in alloc_migrate_target()
It is incorrect to use next_node to find a target node, it will return
MAX_NUMNODES or invalid node.  This will lead to crash in buddy system
allocation.

Fixes: c8721bbbdd36 ("mm: memory-hotplug: enable memory hotplug to handle hugepage")
Signed-off-by: Xishi Qiu <qiuxishi@huawei.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Joonsoo Kim <js1304@gmail.com>
Cc: David Rientjes <rientjes@google.com>
Cc: "Laura Abbott" <lauraa@codeaurora.org>
Cc: Hui Zhu <zhuhui@xiaomi.com>
Cc: Wang Xiaoqiang <wangxq10@lzu.edu.cn>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-04-01 17:03:37 -05:00
..
2015-11-05 19:34:48 -08:00
2015-06-24 17:49:45 -07:00
2016-03-17 15:09:34 -07:00
2011-07-26 16:49:47 -07:00
2016-03-25 16:37:42 -07:00
2016-03-17 15:09:34 -07:00
2016-03-25 16:37:42 -07:00
2016-03-17 15:09:34 -07:00
2016-03-17 15:09:34 -07:00
2016-03-17 15:09:34 -07:00
2016-03-25 16:37:42 -07:00
2015-09-08 15:35:28 -07:00
2016-01-21 17:20:51 -08:00
2016-03-17 15:09:34 -07:00
2016-03-17 15:09:34 -07:00
2015-11-05 19:34:48 -08:00
2016-03-22 15:36:02 -07:00
2016-03-17 15:09:34 -07:00
2016-03-17 15:09:34 -07:00
2016-03-25 16:37:42 -07:00
2016-03-25 16:37:42 -07:00
2016-03-25 16:37:42 -07:00