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:
parent
61d963bc57
commit
0d10741255
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=153993
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user