mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-30 12:04:07 +00:00
Do not catch signals when waiting for a request. This fixes a nasty
race when issuing commands from userland.
This commit is contained in:
parent
5e679b57b6
commit
40f05b02ec
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=128257
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user