lkml.org 
[lkml]   [2010]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -v2] rmap: make anon_vma_prepare link in all the anon_vmas of a mergeable VMA


On Sun, 11 Apr 2010, Borislav Petkov wrote:
>
> > Conversely, if you still see the oops (rather than the watchdog), that
> > means that we actually have pages that are still marked mapped, and that
> > despite that mapped state have a stale page->mapping pointer. I actually
> > find that the more likely case, because otherwise the window is _so_ small
> > that I don't see how you can hit the oops so reliably.
>
> Ok, did test with the all 5 patches applied. It oopsed with the same
> trace, see below. Except one kernel/sched.c:3555 warning checking
> spinlock count overflowing, nothing else. :(

Ok, that preempt-count thing is a real problem, but should be unrelated to
your issues.

Anyway, so this all means that we definitely have lost sight of an
'anon_vma', even if page->mapping still points to it, and even though the
page is still mapped.

I'll see if I can come up with a patch to do the same kind of validation
on page->mapping as on the anon-vma chains themselves.

> I tried to see whether the page->mapping pointer is stale, I dunno,
> maybe there could be something in the register dump which could tell us
> what's happening.

Sadly, you cannot tell by the pointer. A stale pointer still is a
perfectly fine kernel pointer, it's just that we've long since released
the anon_vma it used to point to, and now it points to some random other
data structure.

> So, it really looks like at least that list_head in anon_vma is
> bollocks, or even the whole anon_vma. So if this is correct, it is
> highly likely that the anon_vma is already freed material or not
> initialized at all.

Yes, it's pretty certain it is long free'd, and re-allocated to something
else.

Linus


\
 
 \ /
  Last update: 2010-04-12 02:21    [W:0.587 / U:1.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site