summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2014-01-19 22:21:40 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2014-01-19 22:21:40 +0000
commit455bbd5ebf12f01ca599046bee53cc09b81ec526 (patch)
treed3ad9426f75394acd480ea789e5d8c18307acc67 /sys/dev
parent3133769db2e3c214c064cc73df457352981ff76c (diff)
Assert that a workunit has ccbs if it is being scheduled. Otherwise we
deadlock since nothing will ever come back to tell us that the workunit is completed. ok krw@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/softraid.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c
index a853d43f72b..13c78276c4e 100644
--- a/sys/dev/softraid.c
+++ b/sys/dev/softraid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid.c,v 1.318 2014/01/18 09:33:53 jsing Exp $ */
+/* $OpenBSD: softraid.c,v 1.319 2014/01/19 22:21:39 jsing Exp $ */
/*
* Copyright (c) 2007, 2008, 2009 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org>
@@ -4160,6 +4160,8 @@ sr_schedule_wu(struct sr_workunit *wu)
DNPRINTF(SR_D_WU, "sr_schedule_wu: schedule wu %p state %i "
"flags 0x%x\n", wu, wu->swu_state, wu->swu_flags);
+ KASSERT(wu->swu_io_count > 0);
+
s = splbio();
/* Construct the work unit, do not schedule it. */