From: KAMEZAWA Hiroyuki Date: Mon, 22 Jun 2009 23:57:55 +0000 (+0900) Subject: mm: fix incorrect page removal from LRU X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cb4cbcf6b3cf79f80c157afdc8dd8221643d8481;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git mm: fix incorrect page removal from LRU The isolated page is "cursor_page" not "page". This could cause LRU list corruption under memory pressure, caught by CONFIG_DEBUG_LIST. Reported-by: Ingo Molnar Signed-off-by: KAMEZAWA Hiroyuki Reviewed-by: Balbir Singh Tested-by: Daisuke Nishimura Cc: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/vmscan.c b/mm/vmscan.c index e8fa2d9eb212..54155268dfca 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -932,7 +932,7 @@ static unsigned long isolate_lru_pages(unsigned long nr_to_scan, continue; if (__isolate_lru_page(cursor_page, mode, file) == 0) { list_move(&cursor_page->lru, dst); - mem_cgroup_del_lru(page); + mem_cgroup_del_lru(cursor_page); nr_taken++; scan++; }