From owner-freebsd-bugs@FreeBSD.ORG Thu Jul 19 18:23:27 2007 Return-Path: X-Original-To: freebsd-bugs@freebsd.org Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7B93B16A400 for ; Thu, 19 Jul 2007 18:23:27 +0000 (UTC) (envelope-from Steven.Sears@netapp.com) Received: from mx2.netapp.com (mx2.netapp.com [216.240.18.37]) by mx1.freebsd.org (Postfix) with ESMTP id 60E9513C474 for ; Thu, 19 Jul 2007 18:23:27 +0000 (UTC) (envelope-from Steven.Sears@netapp.com) X-IronPort-AV: E=Sophos;i="4.16,557,1175497200"; d="scan'208";a="83830534" Received: from smtp2.corp.netapp.com ([10.57.159.114]) by mx2-out.netapp.com with ESMTP; 19 Jul 2007 10:55:03 -0700 Received: from svlexrs01.hq.netapp.com (svlexrs01.corp.netapp.com [10.57.156.158]) by smtp2.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id l6JHt0NL028418 for ; Thu, 19 Jul 2007 10:55:03 -0700 (PDT) Received: from exsvlrb01.hq.netapp.com ([10.56.8.62]) by svlexrs01.hq.netapp.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 19 Jul 2007 10:55:01 -0700 Received: from exnane01.hq.netapp.com ([10.97.0.61]) by exsvlrb01.hq.netapp.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 19 Jul 2007 10:55:01 -0700 Received: from 10.97.16.87 ([10.97.16.87]) by exnane01.hq.netapp.com ([10.97.0.61]) with Microsoft Exchange Server HTTP-DAV ; Thu, 19 Jul 2007 17:55:00 +0000 User-Agent: Microsoft-Entourage/11.3.6.070618 Date: Thu, 19 Jul 2007 13:54:58 -0400 From: Steve Sears To: Message-ID: Thread-Topic: kern/111831: [nfs] page fault while in kernel mode with samba in vfs_vmio_release Thread-Index: AcfKLeuyKgW+2zYhEdyKvwAKlb3DXg== Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-OriginalArrivalTime: 19 Jul 2007 17:55:01.0223 (UTC) FILETIME=[ED9DCF70:01C7CA2D] Cc: Subject: 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 List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2007 18:23:27 -0000 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