diff options
author | marcus <marcus@FreeBSD.org> | 2007-09-19 03:59:33 +0000 |
---|---|---|
committer | marcus <marcus@FreeBSD.org> | 2007-09-19 03:59:33 +0000 |
commit | 85efdc89887b0a29f25a8873d160379031602aad (patch) | |
tree | 25fa17f1b4b7debd6e0e34394db72f1a4812cd1b /sys/dev/syscons | |
parent | a3a58105f1952205e27debcee1e7fca92380d1b7 (diff) | |
download | FreeBSD-src-85efdc89887b0a29f25a8873d160379031602aad.zip FreeBSD-src-85efdc89887b0a29f25a8873d160379031602aad.tar.gz |
Fix a bug that will cause a process that calls the VT_WAITACTIVE ioctl
to become unkillable when that process is sent a termination signal. The
process will sit in waitvt looping in the kernel, and chewing up all
available CPU until the system is rebooted.
Submitted by: Jilles Tjoelker <jilles@stack.nl>
Reviewed by: bde
Approved by: re (kensmith)
MFC after: 1 week
Diffstat (limited to 'sys/dev/syscons')
-rw-r--r-- | sys/dev/syscons/syscons.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index 89d60ef..9fc4c3c 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -1073,8 +1073,7 @@ scioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) scp = sc_get_stat(SC_DEV(sc, i)); if (scp == scp->sc->cur_scp) return 0; - while ((error=tsleep(&scp->smode, PZERO|PCATCH, - "waitvt", 0)) == ERESTART) ; + error = tsleep(&scp->smode, PZERO | PCATCH, "waitvt", 0); return error; case VT_GETACTIVE: /* get active vty # */ |