summaryrefslogtreecommitdiffstats
path: root/sys/dev/ciss
diff options
context:
space:
mode:
authorps <ps@FreeBSD.org>2004-04-14 18:55:28 +0000
committerps <ps@FreeBSD.org>2004-04-14 18:55:28 +0000
commited6a88be849b885433c2ebb48032e2ed2b342ef5 (patch)
treeb7e94ee4b8eeeb593b5d9ccd87fe0db28ecbcd03 /sys/dev/ciss
parent3deaf9978bb524fd2b163fb60fe4fdf6db089846 (diff)
downloadFreeBSD-src-ed6a88be849b885433c2ebb48032e2ed2b342ef5.zip
FreeBSD-src-ed6a88be849b885433c2ebb48032e2ed2b342ef5.tar.gz
Do not catch signals when waiting for a request. This fixes a nasty
race when issuing commands from userland.
Diffstat (limited to 'sys/dev/ciss')
-rw-r--r--sys/dev/ciss/ciss.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c
index 18d2fc6..0988b34 100644
--- a/sys/dev/ciss/ciss.c
+++ b/sys/dev/ciss/ciss.c
@@ -1696,20 +1696,8 @@ ciss_wait_request(struct ciss_request *cr, int timeout)
return(error);
s = splcam();
- while (cr->cr_flags & CISS_REQ_SLEEP) {
- error = tsleep(cr, PCATCH, "cissREQ", (timeout * hz) / 1000);
- /*
- * On wakeup or interruption due to restartable activity, go
- * back and check to see if we're done.
- */
- if ((error == 0) || (error == ERESTART)) {
- error = 0;
- continue;
- }
- /*
- * Timeout, interrupted system call, etc.
- */
- break;
+ while ((cr->cr_flags & CISS_REQ_SLEEP) && (error != EWOULDBLOCK)) {
+ error = tsleep(cr, PRIBIO, "cissREQ", (timeout * hz) / 1000);
}
splx(s);
return(error);
OpenPOWER on IntegriCloud