Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 06 Mar 1995 07:34:32 -0800
From:      David Greenman <davidg@Root.COM>
To:        starkhome!gene@sbstark.cs.sunysb.edu (Gene Stark)
Cc:        current@FreeBSD.org, dyson@Root.COM
Subject:   Re: Page fault panics during make world in -current 
Message-ID:  <199503061534.HAA00614@corbin.Root.COM>
In-Reply-To: Your message of "Mon, 06 Mar 95 08:56:07 EST." <199503061356.IAA03953@starkhome.cs.sunysb.edu> 

next in thread | previous in thread | raw e-mail | index | archive | help
>Actually, none of the calls to vm_page_lookup() in vfs_bio.c lock the
>VM object first.  However, after some of them, there are even calls to
>VMWAIT while the pointer to the page is held (e.g. line 1046).
>Why are you sure that the page will still be valid when VMWAIT is over?
>The page fault handler goes to great pains to keep checking that a
>page lookup is still valid after a sleep might have occurred, so I don't
>think it can really be safe to lookup a page with the object unlocked
>and then do arbitrary stuff.

   The code in vfs_bio.c is quite complex. John and I have each gone through
this several times trying to find problems like you've mentioned. We're pretty
sure that the page in question is always made 'busy' or 'bmapped' before any
calls to VM_WAIT (or any other sleep) could otherwise lose the page. I'm not
saying that we might not have missed something...but we have looked at this
specific potential problem more than once. The object itself can't go away
because a reference is held to it.

-DG



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199503061534.HAA00614>