1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-20 11:11:24 +00:00

Sometimes the vty switching has to be delayed; the vty

to be switched to is saved in sc->delayed_next_scr and
the actual switch is performed later.  It was possible
to get into the endless loop when attempting to switch
to a closed vty (which is not allowed and beep-alerted
when attempted) and when the visual beep was in effect.
This caused sc->delayed_next_scr to never be reset and
endless attempts to switch to a closed vty and endless
visual beeping.  How to repeat:

- boot into single-user
- run "kbdcontrol -b visual"
- quickly press Alt+F2 two times

PR:		kern/68016
X-MFC after:	6.2-RELEASE
This commit is contained in:
Ruslan Ermilov 2006-11-06 19:06:07 +00:00
parent 43593547a3
commit 4f32adad48
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=164050

View File

@ -2176,6 +2176,7 @@ sc_switch_scr(sc_softc_t *sc, u_int next_scr)
DPRINTF(5, ("switch delayed\n"));
return 0;
}
sc->delayed_next_scr = 0;
s = spltty();
cur_scp = sc->cur_scp;
@ -2320,7 +2321,6 @@ sc_switch_scr(sc_softc_t *sc, u_int next_scr)
/* this is the start of vty switching process... */
++sc->switch_in_progress;
sc->delayed_next_scr = 0;
sc->old_scp = cur_scp;
sc->new_scp = sc_get_stat(SC_DEV(sc, next_scr));
if (sc->new_scp == sc->old_scp) {