]> git.baikalelectronics.ru Git - kernel.git/commit
printk: avoid double lock acquire
authorPeter Zijlstra <peterz@infradead.org>
Thu, 8 Dec 2011 22:34:13 +0000 (14:34 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 9 Dec 2011 15:50:28 +0000 (07:50 -0800)
commitab5b30c46d329b0edcbfed9e8f09ba603853c659
tree4db1b0103db218d0d0aa26a26232c3674dd18622
parentbf24b215e668ac8f75562e9145123ab1e7d6e9c4
printk: avoid double lock acquire

Commit d7c47e63ebc ("printk: Fix console_sem vs logbuf_lock unlock race")
introduced another silly bug where we would want to acquire an already
held lock.  Avoid this.

Reported-by: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/printk.c