Re: fix iounmap and a pageattr memleak (x86 and x86-64)

Andrea Arcangeli
2005-02-15T11:11:31Z

On Tue, Feb 15, 2005 at 11:51:52AM +0100, Andi Kleen wrote:
> Ok, so it is merely a cosmetic issue.

In practice it's solved, I didn't mean we had a bug still, I'm just
suggesting to fix it in a diffeerent way.

It's not just for cosmetic reasons that I suggest to change this. My
point is that the _real_ reason why we had the bug in the first place is
that people forgets that p->size includes the guard page (because it
shouldn't include the guard page). The fundamental problem of vmalloc
exposing the guard page to the callers (which makes it prone for
mistakes, and prone for breakage if somebody needs all virtual space and
removes the guard page), isn't solved yet.

> I was worried about an actual bug :)

No bugs anymore in practice, the -PAGE_SIZE in arch/x86* is clearly
equivalent to -PAGE_SIZE in mm/vmalloc.c, in practice it's the same
either ways.

> No problem with changing it, but hopefully after 2.6.11.

Ok fine with me, take your time it's clearly not urgent because in
practice no bug can be triggered anymore ;). thanks!