]> git.baikalelectronics.ru Git - kernel.git/commit
blackfin: fix possible deadlock in decode_address()
authorAnton Vorontsov <anton.vorontsov@linaro.org>
Thu, 31 May 2012 23:26:24 +0000 (16:26 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 1 Jun 2012 00:49:30 +0000 (17:49 -0700)
commit863eb63c78e88588348b85cf3b8f3dadfce48194
treef8659ba36228582a114c7809bdf580640eb626cf
parent61c3ea65130f500d49b92f710b181205d236f131
blackfin: fix possible deadlock in decode_address()

Oleg Nesterov found an interesting deadlock possibility:

> sysrq_showregs_othercpus() does smp_call_function(showacpu)
> and showacpu() show_stack()->decode_address(). Now suppose that IPI
> interrupts the task holding read_lock(tasklist).

To fix this, blackfin should not grab the write_ variant of the
tasklist lock, read_ one is enough.

Suggested-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Cc: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/blackfin/kernel/trace.c