summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorGrigoriy Orlov <gluk@cvs.openbsd.org>2001-09-29 20:10:44 +0000
committerGrigoriy Orlov <gluk@cvs.openbsd.org>2001-09-29 20:10:44 +0000
commitc369961cb99fdfeff17da44aa0b2c8dc372a1efd (patch)
tree2f437fed867c61faa2d96b0b6809fc5d290cd00b /sys
parent3987169297d8f3f7f5f444467d6c2826c439520a (diff)
Avoid panic at time of raid autoconfiguration. Raid kernel thread starts
when root filesystem isn't configured yet and some kernel variables can't be initialized. From Thierry Deval <TDeval@PrimeOBJ.COM>
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_descrip.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index 426d40494c5..cf34f59d470 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_descrip.c,v 1.34 2001/07/28 17:12:12 gluk Exp $ */
+/* $OpenBSD: kern_descrip.c,v 1.35 2001/09/29 20:10:43 gluk Exp $ */
/* $NetBSD: kern_descrip.c,v 1.42 1996/03/30 22:24:38 christos Exp $ */
/*
@@ -829,7 +829,8 @@ fdcopy(p)
newfdp = pool_get(&fdesc_pool, PR_WAITOK);
bcopy(fdp, newfdp, sizeof(struct filedesc));
- VREF(newfdp->fd_cdir);
+ if (newfdp->fd_cdir)
+ VREF(newfdp->fd_cdir);
if (newfdp->fd_rdir)
VREF(newfdp->fd_rdir);
newfdp->fd_refcnt = 1;