kbd_bh() is entered during kbd_init()

From: William Lee Irwin III (wli@holomorphy.com)
Date: Tue Aug 27 2002 - 19:40:40 EST


kbd_bh() is entered during kbd_init().

#0 kbd_bh (dummy=0) at /mnt/b/2.5.32/linux-2.5.32/include/asm/processor.h:477
#1 0xc011f609 in tasklet_action (a=0xc032fd80) at softirq.c:197
#2 0xc011f3b2 in do_softirq () at softirq.c:89
#3 0xc0111c43 in smp_apic_timer_interrupt (regs=
      {ebx = -1070383808, ecx = -1070479088, edx = -870318228, esi = -1070859956
, edi = 582, ebp = -870318188, eax = 1, xds = -870383512, xes = -1072627608, ori
g_eax = -17, eip = -1072564974, xcs = 96, eflags = 582, esp = -1070511136, xss =
 -1070144220}) at apic.c:1091
#4 0xc01082a6 in apic_timer_interrupt () at process.c:982
#5 0xc02dce32 in kbd_init ()
    at /mnt/b/2.5.32/linux-2.5.32/include/linux/interrupt.h:162
#6 0xc02dd185 in vty_init () at console.c:2527
#7 0xc02dc4a6 in tty_init () at tty_io.c:2315
#8 0xc02dc259 in chr_dev_init () at mem.c:671
#9 0xc02ce8e5 in do_initcalls () at main.c:491
#10 0xc02ce921 in do_basic_setup () at main.c:542
#11 0xc01050df in init (unused=0x0) at main.c:569

kbd_init() needs to disable interrupts.

Cheers,
Bill

--- linux-2.5.32-virgin/drivers/char/keyboard.c 2002-08-27 12:26:41.000000000 -0700
+++ linux-2.5.32/drivers/char/keyboard.c 2002-08-27 16:45:32.000000000 -0700
@@ -1169,6 +1169,9 @@
 int __init kbd_init(void)
 {
         int i;
+ unsigned long flags;
+
+ local_irq_save(flags);
 
         kbd0.ledflagstate = kbd0.default_ledflagstate = KBD_DEFLEDS;
         kbd0.ledmode = LED_SHOW_FLAGS;
@@ -1183,5 +1186,7 @@
         tasklet_enable(&keyboard_tasklet);
         tasklet_schedule(&keyboard_tasklet);
         input_register_handler(&kbd_handler);
+
+ local_irq_restore(flags);
         return 0;
 }
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Aug 31 2002 - 22:00:21 EST