From: KAMEZAWA Hiroyuki Date: Thu, 29 Jan 2009 22:25:17 +0000 (-0800) Subject: memcg: NULL pointer dereference at rmdir on some NUMA systems X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=299b4eaa302138426d5a9ecd954de1f565d76c94;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git memcg: NULL pointer dereference at rmdir on some NUMA systems N_POSSIBLE doesn't means there is memory...and force_empty can visit invalid node which have no pgdat. To visit all valid nodes, N_HIGH_MEMORY should be used. Reported-by: Li Zefan Signed-off-by: KAMEZAWA Hiroyuki Tested-by: Li Zefan Cc: Balbir Singh Cc: Daisuke Nishimura Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 76feccd26dc3..8e4be9cb2a6a 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -1685,7 +1685,7 @@ move_account: /* This is for making all *used* pages to be on LRU. */ lru_add_drain_all(); ret = 0; - for_each_node_state(node, N_POSSIBLE) { + for_each_node_state(node, N_HIGH_MEMORY) { for (zid = 0; !ret && zid < MAX_NR_ZONES; zid++) { enum lru_list l; for_each_lru(l) {