RE: [PATCH 12/32] Blackfin arch: Fix bug using usb keyboard crashes kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I was fixing this issue some time ago.

With CONFIG_VT (drivers/char/vt.c) enabled and a USB HID keyboard connected, we were seeing bad pointer dereferences in drivers/char/keyboard.c

In function kbd_keycode vc_cons[fg_console].d was un-initialized .

static void kbd_keycode(unsigned int keycode, int down, int hw_raw)
{
--snip--
	struct vc_data *vc = vc_cons[fg_console].d;

--snip--
	tty = vc->vc_tty;
--snip--
}	

The workaround, almost any arch does is to initialize conswitchp with the dummy console.

conswitchp = &dummy_con;	

The dummy console gets automatically selected if there is no other suitable console (VGA).
The bit we were missing is simply this fix.

Best regards,
Michael


------------------------------------------------------------------
********* Analog Devices GmbH         [email protected]
**  *****                                      Systems Engineering
**     ** Wilhelm-Wagenfeld-Strasse 6       
**  ***** D-80807 Munich                      
********* Germany                          
Registergericht München HRB 40368,  Geschäftsführer:  Thomas Wessel, William A. Martin, Margaret Seif

>-----Original Message-----
>From: [email protected] [mailto:[email protected]] On Behalf Of Pekka
>Enberg
>Sent: Montag, 21. Mai 2007 13:40
>To: Bryan Wu
>Cc: [email protected]; [email protected]; linux-
>[email protected]; Michael Hennerich
>Subject: Re: [PATCH 12/32] Blackfin arch: Fix bug using usb keyboard
>crashes kernel
>
>Hi Bryan,
>
>On 5/21/07, Bryan Wu <[email protected]> wrote:
>> +#ifdef CONFIG_DUMMY_CONSOLE
>> +       conswitchp = &dummy_con;
>> +#endif
>>         cclk = get_cclk();
>>         sclk = get_sclk();
>
>This patch has no changelog. While it is probably apparent to you why
>this fixes a crash when using an USB keyboard, it would be nice for
>the rest of us to know which crash it fixes and why.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux