Message ID | alpine.LNX.2.00.1211051106590.1709@eggly.anvils (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
> The fbdev potential for deadlock may be years old, but the warning > (and consequent disabling of lockdep from that point on - making it > useless to everybody else in need of it) is new, and comes from the > commit below in linux-next. > > I revert it in my own testing: if there is no quick fix to the > fbdev issue on the way, Daniel, please revert it from your tree. If you revert it you swap it for a different deadlock - and one that happens more often I would expect. Not very useful. I'm hoping the framebuffer maintainer will bother to respond to this because that's the only way it can be sorted out. Alan -- To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, 5 Nov 2012, Alan Cox wrote: > > The fbdev potential for deadlock may be years old, but the warning > > (and consequent disabling of lockdep from that point on - making it > > useless to everybody else in need of it) is new, and comes from the > > commit below in linux-next. > > > > I revert it in my own testing: if there is no quick fix to the > > fbdev issue on the way, Daniel, please revert it from your tree. > > If you revert it you swap it for a different deadlock - and one that > happens more often I would expect. Not very useful. But a deadlock we have lived with for years. Without reverting, we're prevented from discovering all the new deadlocks we're adding. > > I'm hoping the framebuffer maintainer will bother to respond to this > because that's the only way it can be sorted out. That would be ideal - thanks. Hugh -- To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/kernel/printk.c b/kernel/printk.c index 2d607f4..ee79f14 100644 --- a/kernel/printk.c +++ b/kernel/printk.c @@ -87,6 +87,12 @@ static DEFINE_SEMAPHORE(console_sem); struct console *console_drivers; EXPORT_SYMBOL_GPL(console_drivers); +#ifdef CONFIG_LOCKDEP +static struct lockdep_map console_lock_dep_map = { + .name = "console_lock" +}; +#endif + /* * This is used for debugging the mess that is the VT code by * keeping track if we have the console semaphore held. It's @@ -1914,6 +1920,7 @@ void console_lock(void) return; console_locked = 1; console_may_schedule = 1; + mutex_acquire(&console_lock_dep_map, 0, 0, _RET_IP_); } EXPORT_SYMBOL(console_lock); @@ -1935,6 +1942,7 @@ int console_trylock(void) } console_locked = 1; console_may_schedule = 0; + mutex_acquire(&console_lock_dep_map, 0, 1, _RET_IP_); return 1; } EXPORT_SYMBOL(console_trylock); @@ -2095,6 +2103,7 @@ skip: local_irq_restore(flags); } console_locked = 0; + mutex_release(&console_lock_dep_map, 1, _RET_IP_); /* Release the exclusive_console once it is used */ if (unlikely(exclusive_console))