diff options
| author | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2016-05-19 14:37:24 +0000 |
|---|---|---|
| committer | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2016-05-19 14:37:24 +0000 |
| commit | 2f0586b2ce5a8f582ad7c7388d056faeca194d6e (patch) | |
| tree | 14552fba82d6619e510ce7dea20918cc0e22076c /sys/dev/iscsi | |
| parent | cfce4fbe6fb7eef166e40ea0806544203bde51e9 (diff) | |
Notes
Diffstat (limited to 'sys/dev/iscsi')
| -rw-r--r-- | sys/dev/iscsi/iscsi.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/iscsi/iscsi.c b/sys/dev/iscsi/iscsi.c index 62a9c32c5577..e8c59e761c3a 100644 --- a/sys/dev/iscsi/iscsi.c +++ b/sys/dev/iscsi/iscsi.c @@ -1634,6 +1634,7 @@ iscsi_ioctl_daemon_receive(struct iscsi_softc *sc, struct iscsi_session *is; struct icl_pdu *ip; void *data; + int error; sx_slock(&sc->sc_lock); TAILQ_FOREACH(is, &sc->sc_sessions, is_next) { @@ -1652,8 +1653,13 @@ iscsi_ioctl_daemon_receive(struct iscsi_softc *sc, ISCSI_SESSION_LOCK(is); while (is->is_login_pdu == NULL && is->is_terminating == false && - is->is_reconnecting == false) - cv_wait(&is->is_login_cv, &is->is_lock); + is->is_reconnecting == false) { + error = cv_wait_sig(&is->is_login_cv, &is->is_lock); + if (error != 0) { + ISCSI_SESSION_UNLOCK(is); + return (error); + } + } if (is->is_terminating || is->is_reconnecting) { ISCSI_SESSION_UNLOCK(is); return (EIO); |
