[Lguest] [PATCH] fix lguest rmmod "bad pgd"

Ingo Molnar mingo at elte.hu
Thu Jan 3 19:35:28 EST 2008


* Rusty Russell <rusty at rustcorp.com.au> wrote:

> On Thursday 03 January 2008 00:27:10 pageexec at freemail.hu wrote:
> > (sorry for breaking the thread but i didn't get the original headers)
> >
> > > After 17d57a9206b4de6ad082ac9f2d2346985abbd2aa
> > > (x86: fix x86-32 early fixmap initialization.) removing lg.ko caused a
> > > printk from vunmap:
> > >
> > >  mm/memory.c:115: bad pgd 004b3027.
> > >
> > > On the second use after module load, the kernel crashes.
> > >
> > > This fixes the immediate problem (accessed and dirty bits not set as
> > > expected in pmd_none_or_clear_bad).  I can't see why this would cause a
> > > crash, but I haven't been able to reproduce it once this is applied.
> >
> > it's the 'clear_bad' part that zero's out the pmd and hence destroys
> > all the fixmap mappings in that 4 MB range leading to page faults at
> > probably the most unexpected times.
> 
> Thanks, I had misread the code as clearing it normally anyway.  This 
> is a nasty bug because we'd hit it if we ever filled vmalloc space, 
> but now Linus has applied that patch we should all be merry...

wanna send a patch for the p?d_bad() bug as well? (it should ignore any 
differences in the dirty/accessed bits)

	Ingo



More information about the Lguest mailing list