Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/nfs Do not return a garbage vnode in vpp if fhtovp fails.



details:   https://anonhg.NetBSD.org/src/rev/75f9970ef1b6
branches:  trunk
changeset: 757058:75f9970ef1b6
user:      pooka <pooka%NetBSD.org@localhost>
date:      Thu Aug 12 09:41:10 2010 +0000

description:
Do not return a garbage vnode in vpp if fhtovp fails.

Fixes PR kern/43745 for nfs.

diffstat:

 sys/nfs/nfs_vfsops.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 668aaaeb8d51 -r 75f9970ef1b6 sys/nfs/nfs_vfsops.c
--- a/sys/nfs/nfs_vfsops.c      Thu Aug 12 09:34:16 2010 +0000
+++ b/sys/nfs/nfs_vfsops.c      Thu Aug 12 09:41:10 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nfs_vfsops.c,v 1.216 2010/07/21 17:52:13 hannken Exp $ */
+/*     $NetBSD: nfs_vfsops.c,v 1.217 2010/08/12 09:41:10 pooka Exp $   */
 
 /*
  * Copyright (c) 1989, 1993, 1995
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nfs_vfsops.c,v 1.216 2010/07/21 17:52:13 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_vfsops.c,v 1.217 2010/08/12 09:41:10 pooka Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_nfs.h"
@@ -1104,6 +1104,7 @@
        error = VOP_GETATTR(*vpp, &va, kauth_cred_get());
        if (error != 0) {
                vput(*vpp);
+               *vpp = NULLVP;
        }
        return error;
 }



Home | Main Index | Thread Index | Old Index