]> err.no Git - linux-2.6/commit
[PATCH] fix VmSize and VmData after mremap
authorHugh Dickins <hugh@veritas.com>
Thu, 4 Aug 2005 20:07:09 +0000 (13:07 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 4 Aug 2005 20:11:15 +0000 (13:11 -0700)
commit1c5ad84516ae7ea4ec868436a910a6bd8d20215a
tree929e03789ee2191bbebe45fbd9b6c50865c5f9ca
parente234f35c54a30d040313e40833dcf623d14629b4
[PATCH] fix VmSize and VmData after mremap

mremap's move_vma is applying __vm_stat_account to the old vma which may
have already been freed: move it to just before the do_munmap.

mremapping to and fro with CONFIG_DEBUG_SLAB=y showed /proc/<pid>/status
VmSize and VmData wrapping just like in kernel bugzilla #4842, and fixed by
this patch - worth including in 2.6.13, though not yet confirmed that it
fixes that specific report from Frank van Maarseveen.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
mm/mremap.c