diff options
author | brian <brian@FreeBSD.org> | 2006-01-03 17:01:43 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 2006-01-03 17:01:43 +0000 |
commit | 435383325dd7e25922ce8b53d7129f451041a324 (patch) | |
tree | 56fa1368e62eaa34afea8fbc79bf59ca5a029763 /sys/dev/ichsmb | |
parent | 834b4a427cf2e688b3e0eebeeaa622477f6bf4c0 (diff) | |
download | FreeBSD-src-435383325dd7e25922ce8b53d7129f451041a324.zip FreeBSD-src-435383325dd7e25922ce8b53d7129f451041a324.tar.gz |
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
Diffstat (limited to 'sys/dev/ichsmb')
-rw-r--r-- | sys/dev/ichsmb/ichsmb.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/sys/dev/ichsmb/ichsmb.c b/sys/dev/ichsmb/ichsmb.c index 9361c7e..53a91d0 100644 --- a/sys/dev/ichsmb/ichsmb.c +++ b/sys/dev/ichsmb/ichsmb.c @@ -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; |