From owner-freebsd-bugs@FreeBSD.ORG Thu Jul 19 20:20:09 2007 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6253016A401 for ; Thu, 19 Jul 2007 20:20:09 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 51C0713C4A5 for ; Thu, 19 Jul 2007 20:20:09 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l6JKK9J5002344 for ; Thu, 19 Jul 2007 20:20:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l6JKK9cQ002342; Thu, 19 Jul 2007 20:20:09 GMT (envelope-from gnats) Date: Thu, 19 Jul 2007 20:20:09 GMT Message-Id: <200707192020.l6JKK9cQ002342@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: linimon@lonesome.com (Mark Linimon) Cc: Subject: Re: kern/111831: [nfs] page fault while in kernel mode with samba in vfs_vmio_release X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mark Linimon List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2007 20:20:09 -0000 The following reply was made to PR kern/111831; it has been noted by GNATS. From: linimon@lonesome.com (Mark Linimon) To: bug-followup@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 ----- From: Steve Sears To: freebsd-bugs@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 -----