From 47d4a4d009a9dcf186b4c4887eb741f8f7668e2b Mon Sep 17 00:00:00 2001 From: bjh21 Date: Wed, 27 Dec 2000 16:35:37 +0000 Subject: [PATCH] Extra diagnostic assertion: subtle pmap bugs can ultimately lead to trying to use NULL credentials for NFS ops, so spot them before we dereference them. --- sys/nfs/nfs_socket.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/nfs/nfs_socket.c b/sys/nfs/nfs_socket.c index d4f675b5d104..992e45fc0982 100644 --- a/sys/nfs/nfs_socket.c +++ b/sys/nfs/nfs_socket.c @@ -1,4 +1,4 @@ -/* $NetBSD: nfs_socket.c,v 1.63 2000/12/10 23:17:01 fvdl Exp $ */ +/* $NetBSD: nfs_socket.c,v 1.64 2000/12/27 16:35:37 bjh21 Exp $ */ /* * Copyright (c) 1989, 1991, 1993, 1995 @@ -916,6 +916,7 @@ nfs_request(vp, mrest, procnum, procp, cred, mrp, mdp, dposp) struct nfsnode *np; #endif + KASSERT(cred != NULL); nmp = VFSTONFS(vp->v_mount); MALLOC(rep, struct nfsreq *, sizeof(struct nfsreq), M_NFSREQ, M_WAITOK); rep->r_nmp = nmp;