Module Name: src Committed By: cegger Date: Tue Oct 26 11:44:53 UTC 2010
Modified Files: src/sys/nfs: nfs_vnops.c Log Message: Add diagnostic check which hits when PR 42455 is reproduced. Idea from hans@ To generate a diff of this commit: cvs rdiff -u -r1.284 -r1.285 src/sys/nfs/nfs_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/nfs/nfs_vnops.c diff -u src/sys/nfs/nfs_vnops.c:1.284 src/sys/nfs/nfs_vnops.c:1.285 --- src/sys/nfs/nfs_vnops.c:1.284 Thu Jun 24 13:03:17 2010 +++ src/sys/nfs/nfs_vnops.c Tue Oct 26 11:44:53 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: nfs_vnops.c,v 1.284 2010/06/24 13:03:17 hannken Exp $ */ +/* $NetBSD: nfs_vnops.c,v 1.285 2010/10/26 11:44:53 cegger Exp $ */ /* * Copyright (c) 1989, 1993 @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: nfs_vnops.c,v 1.284 2010/06/24 13:03:17 hannken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nfs_vnops.c,v 1.285 2010/10/26 11:44:53 cegger Exp $"); #ifdef _KERNEL_OPT #include "opt_nfs.h" @@ -1378,6 +1378,14 @@ if (v3) { wccflag = NFSV3_WCCCHK; nfsm_wcc_data(vp, wccflag, NAC_NOTRUNC, !error); + + /* Diagnostic check: The KASSERT hits when PR 42455 + * is reproduced. + */ + if (ctx.nwc_mbufcount >= 2) { + KASSERT(mb->m_next != NULL); + } + if (!error) { nfsm_dissect(tl, u_int32_t *, 2 * NFSX_UNSIGNED + NFSX_V3WRITEVERF);