summaryrefslogtreecommitdiffstats
path: root/sys/dev/aac
diff options
context:
space:
mode:
authorluoqi <luoqi@FreeBSD.org>2007-02-14 09:10:37 +0000
committerluoqi <luoqi@FreeBSD.org>2007-02-14 09:10:37 +0000
commit59d9c63868cc70ddfa93773887808c29f5214891 (patch)
treee3005fe5fe5e960c891dcd5e906ca057c039dc73 /sys/dev/aac
parent3cdd817959d317e0531b737d1dc174f8262c187c (diff)
downloadFreeBSD-src-59d9c63868cc70ddfa93773887808c29f5214891.zip
FreeBSD-src-59d9c63868cc70ddfa93773887808c29f5214891.tar.gz
The return value of aac_alloc_command() was misinterpreted in aac_ioctl_event().
Once triggered this would leak away all available commands and starve the rest of the driver. Reviewed by: scottl
Diffstat (limited to 'sys/dev/aac')
-rw-r--r--sys/dev/aac/aac.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/aac/aac.c b/sys/dev/aac/aac.c
index d1f2723..3b6ad54 100644
--- a/sys/dev/aac/aac.c
+++ b/sys/dev/aac/aac.c
@@ -2982,7 +2982,7 @@ aac_ioctl_event(struct aac_softc *sc, struct aac_event *event, void *arg)
switch (event->ev_type) {
case AAC_EVENT_CMFREE:
mtx_lock(&sc->aac_io_lock);
- if (aac_alloc_command(sc, (struct aac_command **)arg) == 0) {
+ if (aac_alloc_command(sc, (struct aac_command **)arg)) {
aac_add_event(sc, event);
mtx_unlock(&sc->aac_io_lock);
return;
OpenPOWER on IntegriCloud