diff options
author | ed <ed@FreeBSD.org> | 2008-08-31 10:17:40 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2008-08-31 10:17:40 +0000 |
commit | af5f6ae3e7ac4c9ea61d89fae3267b0166874970 (patch) | |
tree | c3d5c31e1d60af9f89d0b18a6f4108c0b31093bd /sys | |
parent | 1ab8b1ad33760215eaf34c34b010ed94c0666631 (diff) | |
download | FreeBSD-src-af5f6ae3e7ac4c9ea61d89fae3267b0166874970.zip FreeBSD-src-af5f6ae3e7ac4c9ea61d89fae3267b0166874970.tar.gz |
Disable processing of output data after disabling scroll lock by force.
The syscons code disabled scroll lock inside sc_cnputs() if it's going
to print a system message. The code currently wants to process any TTY
output data as well, but we cannot do this, because the TTY lock is a
sleep mutex, while cnputs() picks up a spin mutex.
Disable the code for now. It solves a panic when a console message is
printed while scroll lock is enabled. One solution would be to
initialize a task structure here.
Reported by: Paul B. Mahol <onemda gmail com>
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/syscons/syscons.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index 3c83adb..37b08b6 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -1509,7 +1509,9 @@ sc_cnputc(struct consdev *cd, int c) scr_stat *scp = sc_console; void *save; #ifndef SC_NO_HISTORY +#if 0 struct tty *tp; +#endif #endif /* !SC_NO_HISTORY */ int s; @@ -1526,11 +1528,18 @@ sc_cnputc(struct consdev *cd, int c) scp->status |= CURSOR_ENABLED; sc_draw_cursor_image(scp); } +#if 0 + /* + * XXX: Now that TTY's have their own locks, we cannot process + * any data after disabling scroll lock. cnputs already holds a + * spinlock. + */ tp = SC_DEV(scp->sc, scp->index); tty_lock(tp); if (tty_opened(tp)) sctty_outwakeup(tp); tty_unlock(tp); +#endif } #endif /* !SC_NO_HISTORY */ |