summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authordogcow <dogcow@NetBSD.org>2006-03-18 01:13:24 +0000
committerdogcow <dogcow@NetBSD.org>2006-03-18 01:13:24 +0000
commitde119fc4bdc975dfa9adbb9d8d4720c35236355e (patch)
tree3a79c41f52a5de41160958efe3f95a4cc417c34b /sys/dev
parentc8593a1a3c4bc6af94b2cf35528ece2a674ee0fa (diff)
in VNDIOCGET, make sure there's a valid lwp. coverity CID 837.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/vnd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c
index 7defc4e9661..947766e8f0d 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 <sys/cdefs.h>
-__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;