]> git.baikalelectronics.ru Git - kernel.git/commit
kprobes: Skip kretprobe hit in NMI context to avoid deadlock
authorMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Mon, 4 Aug 2014 03:10:16 +0000 (03:10 +0000)
committerIngo Molnar <mingo@kernel.org>
Fri, 8 Aug 2014 08:38:04 +0000 (10:38 +0200)
commitb32fac698223d342eb5c8a010a8fe76ab4940746
treec3974ec34ef0e249e25819248d84b8ec2c80325c
parent4725b63a710f58d206250d77b25a7296e1353574
kprobes: Skip kretprobe hit in NMI context to avoid deadlock

Skip kretprobe hit in NMI context, because if an NMI happens
inside the critical section protected by kretprobe_table.lock
and another(or same) kretprobe hit, pre_kretprobe_handler
tries to lock kretprobe_table.lock again.
Normal interrupts have no problem because they are disabled
with the lock.

Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Acked-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: David S. Miller <davem@davemloft.net>
Link: http://lkml.kernel.org/r/20140804031016.11433.65539.stgit@kbuild-fedora.novalocal
[ Minor edits for clarity. ]
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/kprobes.c