summaryrefslogtreecommitdiffstats
path: root/sys/dev/softraid.c
diff options
context:
space:
mode:
authormarco <marco@openbsd.org>2008-06-12 01:26:16 +0000
committermarco <marco@openbsd.org>2008-06-12 01:26:16 +0000
commite058dda4f0a2ed23e62eb13c1eb83ed205146205 (patch)
tree82d01299322812cb9069c68f4beeac97ac2e5b82 /sys/dev/softraid.c
parentSkip 64-bit BARs correctly when initing. (diff)
downloadwireguard-openbsd-e058dda4f0a2ed23e62eb13c1eb83ed205146205.tar.xz
wireguard-openbsd-e058dda4f0a2ed23e62eb13c1eb83ed205146205.zip
Be more paranoid before disestablishing hook
ok hshoexer
Diffstat (limited to 'sys/dev/softraid.c')
-rw-r--r--sys/dev/softraid.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c
index f192ae39fb2..3ea83e31c57 100644
--- a/sys/dev/softraid.c
+++ b/sys/dev/softraid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid.c,v 1.108 2008/06/12 00:19:15 marco Exp $ */
+/* $OpenBSD: softraid.c,v 1.109 2008/06/12 01:26:16 marco Exp $ */
/*
* Copyright (c) 2007 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org>
@@ -1416,7 +1416,8 @@ sr_shutdown_discipline(struct sr_discipline *sd)
s = splbio();
- shutdownhook_disestablish(sd->sd_shutdownhook);
+ if (sd->sd_shutdownhook)
+ shutdownhook_disestablish(sd->sd_shutdownhook);
/* make sure there isn't a sync pending and yield */
wakeup(sd);