Re: [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U8

From: Ingo Molnar
Date: Thu Oct 21 2004 - 03:29:01 EST



* Michal Schmidt <xschmi00@xxxxxxxxxxxxxxxxxx> wrote:

> That patch was not enough. The BUGs were still showing up the same as
> before. I tried to debug it myself. I've found an interesting thing in
> kernel/printk.c:release_console_sem(). There is the following
> sequence:
>
> spin_lock_irqsave(&logbuf_lock, flags);
> /* ... some code ... */
> spin_unlock(&logbuf_lock);
> call_console_drivers(...);
> local_irq_restore(flags);
>
> I know very little about locking, but I didn't like this two-phased
> unlock. So I replaced it with a single spin_unlock_irqrestore. Patch
> attached. I'm almost certain that there is a reason for the two-phased
> unlocking and that this patch will break something, but so far it
> works for me. netconsole now works without complaining.

ah, indeed. Note that this is still not enough - please try to add a
local_irq_enable() to netconsole.c's console-write function - does that
fix it equally well for you?

the reason is that if we crash within an irqs-off section then
netconsole will still be called with interrupts disabled and will
trigger the assert.

Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/