Warning ! Bug in keyboard driver of 99.9

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Joerg Pommnitz
Date: Thursday, April 29, 1993 - 6:38 am

Yesterday I have found a bug in the keyboard driver of 99.9.
Try the following:

        1) sync your disks :)
        2) go to a free virtual console
        3) press CTRL-BREAK
        4) enjoy the panic :):)

The buggy code is in keyboard.c, function

static void scroll(int sc) /* line 266 */

The beginning statement of this function is:

        if (kbd_dead(KGD_E0))
                put_queue(INTR_CHAR(tty));

On an empty VC tty is still a NULL pointer, so dereferencing
tty in INTR_CHAR will cause a segmentation violation. If
your system is under minimal load, this will likely kill
the idle task and cause a kernel panic ! Even if its only
a user process the system will freeze.

To avoid this problem make the following change:


        if (kbd_dead(KGD_E0)){
                if (tty)
                        put_queue(INTR_CHAR(tty));
        }

I have mailed to Linus about the bug.

                                        Joerg
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Warning ! Bug in keyboard driver of 99.9, Joerg Pommnitz, (Thu Apr 29, 6:38 am)