diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2014-01-19 22:21:40 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2014-01-19 22:21:40 +0000 |
commit | 455bbd5ebf12f01ca599046bee53cc09b81ec526 (patch) | |
tree | d3ad9426f75394acd480ea789e5d8c18307acc67 /sys/dev | |
parent | 3133769db2e3c214c064cc73df457352981ff76c (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.c | 4 |
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. */ |