Re: [PATCH] mremap corrupts freed vma

From: Hugh Dickins (hugh@veritas.com)
Date: Tue Sep 03 2002 - 14:43:50 EST


On Mon, 19 Aug 2002, Hugh Dickins wrote:
> My tricksy accounting code in mremap's move_vma assumed 2.4 behaviour
> in do_munmap, which preserved vma: but 2.5 splitvma may substitute it.
> Showed up as Committed_AS growing each time kernel built with kallsyms;
> but more seriously, it was writing to an area already kmem_cache_freed.

Thanks, Christoph: your split_vma mods in 2.5.33-mm1 fix that issue.

(Linus didn't apply my patch: maybe he just missed it, or maybe he
saw, as I later did, that it would be a lot better to use splitvma
inside move_vma, instead of second-guessing what do_munmap might do.
But when I went to do so, I recoiled in fright from trying to work out
the right handling of splitvma error which move_vma currently forgets.)

Hugh

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Sep 07 2002 - 22:00:18 EST