[PATCH] mm: migration page refcounting fix
authorNick Piggin <npiggin@suse.de>
Thu, 19 Jan 2006 01:42:27 +0000 (17:42 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 19 Jan 2006 03:20:17 +0000 (19:20 -0800)
commit053837fce7aa79025ed57656855df09f80175527
tree05d7615894131a368fc4943f641b11acdd2ae694
parente236a166b2bc437769a9b8b5d19186a3761bde48
[PATCH] mm: migration page refcounting fix

Migration code currently does not take a reference to target page
properly, so between unlocking the pte and trying to take a new
reference to the page with isolate_lru_page, anything could happen to
it.

Fix this by holding the pte lock until we get a chance to elevate the
refcount.

Other small cleanups while we're here.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
include/linux/mm_inline.h
include/linux/swap.h
mm/filemap.c
mm/mempolicy.c
mm/rmap.c
mm/swap.c
mm/vmscan.c