This signal handling code is worse than a no-op. If a

signal is received during the msleep, the msleep is retried
indefinitely as it just keeps returning ERESTART because of
the pending signal.

Instead, just don't PCATCH - the signal can wait.

Sponsored by:	Sophos/ActiveState
This commit is contained in:
Brian Somers 2006-01-03 17:01:43 +00:00
parent 61d963bc57
commit 0d10741255
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=153993

View File

@ -625,14 +625,9 @@ ichsmb_wait(sc_p sc)
KASSERT(sc->ich_cmd != -1,
("%s: ich_cmd=%d\n", __func__ , sc->ich_cmd));
mtx_assert(&sc->mutex, MA_OWNED);
sleep:
error = msleep(sc, &sc->mutex, PZERO | PCATCH, "ichsmb", hz / 4);
error = msleep(sc, &sc->mutex, PZERO, "ichsmb", hz / 4);
DBG("msleep -> %d\n", error);
switch (error) {
case ERESTART:
if (sc->ich_cmd != -1)
goto sleep;
/* FALLTHROUGH */
case 0:
smb_error = sc->smb_error;
break;