From e1433e6b8afc455a44bc1f45cbec39de36c7c5f7 Mon Sep 17 00:00:00 2001 From: Joe Marcus Clarke Date: Wed, 19 Sep 2007 03:59:33 +0000 Subject: [PATCH] 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 Reviewed by: bde Approved by: re (kensmith) MFC after: 1 week --- sys/dev/syscons/syscons.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index 89d60ef3a4a..9fc4c3cc1e0 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 # */