From de119fc4bdc975dfa9adbb9d8d4720c35236355e Mon Sep 17 00:00:00 2001 From: dogcow Date: Sat, 18 Mar 2006 01:13:24 +0000 Subject: [PATCH] in VNDIOCGET, make sure there's a valid lwp. coverity CID 837. --- sys/dev/vnd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c index 7defc4e96611..947766e8f0d4 100644 --- a/sys/dev/vnd.c +++ b/sys/dev/vnd.c @@ -1,4 +1,4 @@ -/* $NetBSD: vnd.c,v 1.141 2006/03/01 12:38:13 yamt Exp $ */ +/* $NetBSD: vnd.c,v 1.142 2006/03/18 01:13:24 dogcow Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -133,7 +133,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.141 2006/03/01 12:38:13 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.142 2006/03/18 01:13:24 dogcow Exp $"); #if defined(_KERNEL_OPT) #include "fs_nfs.h" @@ -1170,6 +1170,7 @@ unlock_and_exit: struct vnd_user *vnu; struct vattr va; vnu = (struct vnd_user *)data; + if (l == NULL) panic("VNDIOCGET: lwp == NULL!"); switch (error = vnd_cget(l, unit, &vnu->vnu_unit, &va)) { case 0: vnu->vnu_dev = va.va_fsid;