* Aivils Stoss (Aiv...@un...) [021024 09:51]:
>
> Andreas wrote:
> >> >> Now understand.
> >> >>
> >> >
> >> >COOL! that fixed it, actually.
> >
> >it fixed the oops.
> >
> >however, that bug had the side effect that the kbd_event()
> >function returns immediatly without calling kbd_keycode() any
> >more, because
> >if (!vt->fg_console->vc_tty) return;
> >
> >we did set the vc->vc_tty=NULL in vt_close, after all.
> >
> >So it would be better to actually find a free tty (from the
> >vty_driver->table, which holds all the vt`s ttys. Are they
> >intendet for this purpose?).
> >
> >so how does one recognize a free tty?
>
> I mistake. keyboard.c is vc->vc_tty == NULL safe.
that actually fixes that oops, but it does create other funnies,
which make me think that it would be necessary to differentiat a
little more. for me this change made the first vc (vc0) on VT0
dissapear. as one result the shifting through the VCs with
ALT-Left and ALT-Right does now end at vt6 and vt1. vt7 and vt0
became invalid. this is checked for in vt_callback, where the
actual switching happens.
Again, i think this needs to be initialized properly. I have
stared at the VC, TTY and VT code for some time now but do not
understand how this would be initialized correctly in vt_close.
Do we need some check if we are closing a tty which is associated
to the VCs? I have the code for tty paranoia checking compiled in
and if it works correctly this should be caught in relese_dev in
tty_io.c.
on other switching bug is in fn_dec_console fn_inc_console in
keyboard.c. this surfaces when we try the console switching on
a dumb VT. strangly i get an oops only if decrementing (alt-left)
the vc, eventhough it should trigger the same error in
incrementing the console. again, this is an initialisation issue,
because find_vc return a nullpointer if the tty/vc is not
initialised correctly. This nullpointer would get dereferenced in
set_console() and that causes the oops.
James, could you write something up about the initialisation
strategy and stuff?
attached find some obvious fixes for vt.c. non of these address
the issues mentioned above.
|