From: Johannes Weiner Date: Thu, 30 Apr 2009 22:08:08 +0000 (-0700) Subject: mm: fix pageref leak in do_swap_page() X-Git-Tag: v2.6.30-rc5~81 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc43f75cd9815833b27831600ccade672edb5e43;p=pandora-kernel.git mm: fix pageref leak in do_swap_page() By the time the memory cgroup code is notified about a swapin we already hold a reference on the fault page. If the cgroup callback fails make sure to unlock AND release the page reference which was taken by lookup_swap_cach(), or we leak the reference. Signed-off-by: Johannes Weiner Cc: Balbir Singh Reviewed-by: Minchan Kim Acked-by: KAMEZAWA Hiroyuki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed