kern/111831: [nfs] page fault while in kernel mode with samba in vfs_vmio_release

Mark Linimon linimon at lonesome.com
Thu Jul 19 20:20:09 UTC 2007


The following reply was made to PR kern/111831; it has been noted by GNATS.

From: linimon at lonesome.com (Mark Linimon)
To: bug-followup at FreeBSD.org
Cc:  
Subject: Re: kern/111831: [nfs] page fault while in kernel mode with samba in vfs_vmio_release
Date: Thu, 19 Jul 2007 15:12:26 -0500

 ----- Forwarded message from Steve Sears <sjs at netapp.com> -----
 
 From: Steve Sears <sjs at netapp.com>
 To: freebsd-bugs at FreeBSD.org
 
 I hit this bug and fixed it thusly in nfsclient/nfs_bio.c, around line 1735:
 
             } else {
             if (error) {
             bp->b_ioflags |= BIO_ERROR;
             /* Mark buffer invalid which will result in invalidating
              * its pages and other buffer cleanup in brelse().
              * Cannot set BIO_ERROR without marking buffer B_INVAL.
              */
 +++         bp->b_flags |= B_INVAL;
             bp->b_error = np->n_error = error;
             np->n_flag |= NWRITEERR;
 +++         np->n_attrstamp = 0;
             }
             bp->b_dirtyoff = bp->b_dirtyend = 0;
 
 Part of the problem is that the transport is returning an error that is not
 being dealt with gracefully. In my case it was EAGAIN. I also fixed the
 socket code to retry in the session layer if it gets EAGAIN. I'm using a
 specialized transport, so that part of the fix is not relevant.
 
 I just looked at the file in the CVS repository and version 1.152.2.5,
 2007/07/17 21:02:08, is the same fix. If this change is MFC'd to 6.2, the
 submitter should be happy.
 
 
  -Steve
 
 ----- End forwarded message -----


More information about the freebsd-bugs mailing list