diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2012-02-04 21:44:55 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2012-02-04 21:44:55 +0000 |
commit | a18d78fa5c6e118934514091c938a5aa2524695d (patch) | |
tree | e9899ff63364af3081b0d7a161a0cb06abcf9fa3 /sys/dev/ic/sili.c | |
parent | 45bbb3e60425cb31ca89b57b2b8e775c97638385 (diff) |
Close races where timer is started on a command and then an splbio()
is called before the command is started. This might have resulted
in the timeout firing and invalidating the command before it is
started. Move the timeout_add_* inside the relevant splbio()/splx().
ok miod@ tedu@
Diffstat (limited to 'sys/dev/ic/sili.c')
-rw-r--r-- | sys/dev/ic/sili.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ic/sili.c b/sys/dev/ic/sili.c index 9fe184e0edf..065699d339f 100644 --- a/sys/dev/ic/sili.c +++ b/sys/dev/ic/sili.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sili.c,v 1.50 2012/02/04 17:52:22 krw Exp $ */ +/* $OpenBSD: sili.c,v 1.51 2012/02/04 21:44:54 krw Exp $ */ /* * Copyright (c) 2007 David Gwynne <dlg@openbsd.org> @@ -1460,8 +1460,8 @@ sili_ata_cmd(struct ata_xfer *xa) if (xa->flags & ATA_F_POLL) sili_poll(ccb, xa->timeout, sili_ata_cmd_timeout); else { - timeout_add_msec(&xa->stimeout, xa->timeout); s = splbio(); + timeout_add_msec(&xa->stimeout, xa->timeout); sili_start(sp, ccb); splx(s); } |