Source-Changes-HG archive

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

[src/netbsd-2-0]: src/sys/nfs Pull up revision 1.134 (requested by yamt in ti...



details:   https://anonhg.NetBSD.org/src/rev/9016672d9b1e
branches:  netbsd-2-0
changeset: 561486:9016672d9b1e
user:      tron <tron%NetBSD.org@localhost>
date:      Mon Jun 21 10:15:57 2004 +0000

description:
Pull up revision 1.134 (requested by yamt in ticket #515):
nfs_searchdircache: fix a null dereference in the case that
offset!=0 and dircache hasn't been initialized yet.

diffstat:

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

diffs (28 lines):

diff -r c1ebac128818 -r 9016672d9b1e sys/nfs/nfs_subs.c
--- a/sys/nfs/nfs_subs.c        Mon Jun 21 10:13:13 2004 +0000
+++ b/sys/nfs/nfs_subs.c        Mon Jun 21 10:15:57 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nfs_subs.c,v 1.132 2004/03/19 13:53:28 yamt Exp $      */
+/*     $NetBSD: nfs_subs.c,v 1.132.2.1 2004/06/21 10:15:57 tron Exp $  */
 
 /*
  * Copyright (c) 1989, 1993
@@ -70,7 +70,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nfs_subs.c,v 1.132 2004/03/19 13:53:28 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_subs.c,v 1.132.2.1 2004/06/21 10:15:57 tron Exp $");
 
 #include "fs_nfs.h"
 #include "opt_nfs.h"
@@ -1263,6 +1263,9 @@
        if (off == 0)
                return &dzero;
 
+       if (!np->n_dircache)
+               return NULL;
+
        /*
         * We use a 32bit cookie as search key, directly reconstruct
         * the hashentry. Else use the hashfunction.



Home | Main Index | Thread Index | Old Index