forked from Minki/linux
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 <mingo@elte.hu> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Reviewed-by: Balbir Singh <balbir@linux.vnet.ibm.com> Tested-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
d888a4c76c
commit
cb4cbcf6b3
@ -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++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user