From: Aivils S. <Aiv...@un...> - 2002-10-21 13:21:01
|
>ok, some more research, but i still do not understand what really >happens. > >the tty_struct which later is found from kdb_keycode and causes >the oops in tty_insert_flip_char() is correctly kfree()d much >earlier, when the tty is shut down at some point. (they seem to >be opened and released all the time for different purposes.) > >But in the vc->vc_tty pointer keeps pointing to the old, freed >tty_struct. >where should that pointer be reset, if a tty is released? > >Shouldnt this happen in tty_io.c in release_dev()? this is not >the case in ruby or in Aivils backport to 2.4. Now understand. --- drivers/char/vt.c.orig Mon Sep 23 21:19:26 2002 +++ drivers/char/vt.c Mon Oct 21 18:46:36 2002 @@ -1277,11 +1277,14 @@ static int vt_open(struct tty_struct *tt static void vt_close(struct tty_struct *tty, struct file *filp) { + struct vc_data *vc; if (!tty) return; if (tty->count != 1) return; vcs_make_devfs(minor(tty->device), 1); + vc = (struct vc_data *) tty->driver_data; + vc->vc_tty = NULL; tty->driver_data = 0; } James Simons Current ruby CVS call vt_map_input() vt.c any time when keyboard pluged into box. If user plug USB keyboard multiple times in vt_map_input() vty_driver allocated again and again, called from kbd_connect() keyboard.c. Your sugestion? 1) Free vty_driver in the kbd_disconnect() or 2) ignore vt_map_input() second call from kbd_connect() if vty_driver already allocated for this VT. Me like 2) because VT never released. Aivils Stoss |