X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=kernel%2Fprintk.c;h=0b31715f335a7a8ba1a846fe3b93fe71d97cd8d7;hb=08913c2d2445da9f17a32186418e61baa4ae85b6;hp=f24633afa46a5e7c8c3ae9010548fc95c122d825;hpb=69086a78bdc973ec0b722be790b146e84ba8a8c4;p=karo-tx-linux.git diff --git a/kernel/printk.c b/kernel/printk.c index f24633afa46a..0b31715f335a 100644 --- a/kernel/printk.c +++ b/kernel/printk.c @@ -88,6 +88,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 @@ -1919,6 +1925,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); @@ -1940,6 +1947,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); @@ -2102,6 +2110,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))