From owner-freebsd-bugs Mon Jul 24 09:21:50 1995 Return-Path: bugs-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.11/8.6.6) id JAA25717 for bugs-outgoing; Mon, 24 Jul 1995 09:21:50 -0700 Received: (from dyson@localhost) by freefall.cdrom.com (8.6.11/8.6.6) id JAA25708 ; Mon, 24 Jul 1995 09:21:49 -0700 From: John Dyson Message-Id: <199507241621.JAA25708@freefall.cdrom.com> Subject: Re: brelse() panic in nfs_read()/nfs_bioread() To: dfr@render.com (Doug Rabson) Date: Mon, 24 Jul 1995 09:21:49 -0700 (PDT) Cc: dillon@blob.best.net, bugs@freebsd.org In-Reply-To: from "Doug Rabson" at Jul 24, 95 05:13:35 pm X-Mailer: ELM [version 2.4 PL24] Content-Type: text Content-Length: 879 Sender: bugs-owner@freebsd.org Precedence: bulk > > The sequence of events in nfs_bioread is more-or-less: > > vfs_busy_pages(bp, 0); > > biodone(bp); /* called from nfs_doio */ > ... > uiomove(...); > ... > brelse(bp); > > Is it possible that the pages can be reclaimed between the biodone(bp) > and the brelse(bp). The buffer is still busy, so another getblk will > wait until the release but the pages are 'unbusied' in biodone. If a > sleep happens in uiomove as a result of a pagefault, then perhaps the VM > system snatches the pages away then. > > One could fix this by surrounding the uiomove with calls to > vfs_busy_pages and vfs_unbusy_pages. There must be a better way though. If the pages are resident in a buffer (even if replaced by a bogus page), they should be bmapped and immune from the dastardly deeds of the rest of the VM system (I hope). John dyson@root.com