]> git.karo-electronics.de Git - karo-tx-linux.git/commit
printk: fix lockdep instrumentation of console_sem
authorJan Kara <jack@suse.cz>
Thu, 22 May 2014 00:43:35 +0000 (10:43 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 22 May 2014 00:43:35 +0000 (10:43 +1000)
commitee75ecbd8b9ad26cd0094573cd4b612ab20b3e71
treed6b680e4dd6905e769d73dca3bd6af0d41a275f4
parent3bd16050e9c555cb7b08a4f830db95e9025336e6
printk: fix lockdep instrumentation of console_sem

Printk calls mutex_acquire() / mutex_release() by hand to instrument
lockdep about console_sem.  However in some corner cases the
instrumentation is missing.  Fix the problem by creating helper functions
for locking / unlocking console_sem which take care of lockdep
instrumentation as well.

Signed-off-by: Jan Kara <jack@suse.cz>
Reported-by: Fabio Estevam <festevam@gmail.com>
Reported-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
Tested-By: Valdis Kletnieks <valdis.kletnieks@vt.edu>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
kernel/printk/printk.c