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);