summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-05-11 11:08:49 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-05-11 11:08:49 -0700
commitf358166a9405e4f1d8e50d8f415c26d95505b6de (patch)
tree7f5349d9e8b59633b9f8a7bd9bcd45ace1d21a41 /block
parent0e44dc383787b472a7f13564c6bd8a44cc07d408 (diff)
downloadop-kernel-dev-f358166a9405e4f1d8e50d8f415c26d95505b6de.zip
op-kernel-dev-f358166a9405e4f1d8e50d8f415c26d95505b6de.tar.gz
ptrace_attach: fix possible deadlock schenario with irqs
Eric Biederman points out that we can't take the task_lock while holding tasklist_lock for writing, because another CPU that holds the task lock might take an interrupt that then tries to take tasklist_lock for writing. Which would be a nasty deadlock, with one CPU spinning forever in an interrupt handler (although admittedly you need to really work at triggering it ;) Since the ptrace_attach() code is special and very unusual, just make it be extra careful, and use trylock+repeat to avoid the possible deadlock. Cc: Oleg Nesterov <oleg@tv-sign.ru> Cc: Eric W. Biederman <ebiederm@xmission.com> Cc: Roland McGrath <roland@redhat.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud