Re: [PATCH -v2] rmap: make anon_vma_prepare link in all the anon_vmasof a mergeable VMA

From: Linus Torvalds
Date: Sat Apr 10 2010 - 16:18:04 EST




On Sat, 10 Apr 2010, Linus Torvalds wrote:
>
> This patch is scary and untested, but the more I look at that code, the
> more convinced I am that vma_adjust was _really_ badly screwed up. The
> patch below may make things worse. I'll test it myself too, but I'm
> sending it out first, since I was writing the email as I was looking at
> the piece of cr*p.

Ok, it boots. Which means it must be bug-free and perfect. And I really am
convinced that the old vma_adjust() use of anon_vma_clone() was _totally_
broken, so this really could explain everything.

The RCU grace period thing for the TLB flush does look like a real bug
too, but it's one that is probably impossible to hit in practice.

A broken vma_adjust(), however, would seem to be trivial to hit once you
just get the right memory freeing patterns going, because the anon_vma
would easily be _loong_ gone because we didn't create a chain to it at
all, so the anon_vma code decided that it's not used any more.

So I'm actually pretty optimistic that this really is it.

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