From: Aivils S. <Aiv...@un...> - 2002-09-02 14:37:22
|
Hi Here bug to lead oops. My show up depend hardware and console count. Without this patch I get message: Uncompressing Linux kernel invalid compressed format (err=2) -- system halted and more various oops. After patch I get normal ruby. kmalloc not change memory content. vty_driver->termios stay undefined. Later in init_dev() tty_io.c termios checking going to wrong way and kernel oops. --- ruby/linux/drivers/char/vt.c Sat Jul 27 22:33:27 2002 +++ linr/drivers/char/vt.c Mon Sep 2 20:00:37 2002 @@ -1602,12 +1603,18 @@ void vt_map_input(struct vt_struct *vt) vty_driver->table = kmalloc(sizeof(struct tty_struct) * MAX_NR_USER_CONSOLES, GFP_KERNEL); + memset(vty_driver->table, + 0, sizeof(struct tty_struct) * MAX_NR_USER_CONSOLES); vty_driver->termios = kmalloc(sizeof(struct termios) * MAX_NR_USER_CONSOLES, GFP_KERNEL); + memset(vty_driver->termios, + 0, sizeof(struct termios) * MAX_NR_USER_CONSOLES); vty_driver->termios_locked = kmalloc(sizeof(struct termios) * MAX_NR_USER_CONSOLES, GFP_KERNEL); + memset(vty_driver->termios_locked, + 0, sizeof(struct termios) * MAX_NR_USER_CONSOLES); vty_driver->magic = TTY_DRIVER_MAGIC; vty_driver->name = "vc/%d"; Aivils |