diff options
author | Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> | 2013-04-18 18:33:18 +0900 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-18 08:58:38 -0700 |
commit | 5c51543b0ae45967cfa99ca16748dc72888cc265 (patch) | |
tree | 3bcc3c5f26adf4c773e934f110b596914b4fb856 /block | |
parent | d202f05158442396033f416df376f8ece1f563df (diff) | |
download | linux-5c51543b0ae45967cfa99ca16748dc72888cc265.tar.gz linux-5c51543b0ae45967cfa99ca16748dc72888cc265.tar.bz2 linux-5c51543b0ae45967cfa99ca16748dc72888cc265.zip |
kprobes: Fix a double lock bug of kprobe_mutex
Fix a double locking bug caused when debug.kprobe-optimization=0.
While the proc_kprobes_optimization_handler locks kprobe_mutex,
wait_for_kprobe_optimizer locks it again and that causes a double lock.
To fix the bug, this introduces different mutex for protecting
sysctl parameter and locks it in proc_kprobes_optimization_handler.
Of course, since we need to lock kprobe_mutex when touching kprobes
resources, that is done in *optimize_all_kprobes().
This bug was introduced by commit ad72b3bea744 ("kprobes: fix
wait_for_kprobe_optimizer()")
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Acked-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions