path: root/arch/arm/mach-highbank/highbank.c
diff options
authorOleg Nesterov <>2012-09-30 20:31:41 +0200
committerAnton Arapov <>2012-10-29 11:50:19 +0100
commit7e0dbbe849e1d99b1b3ae1b5acc7a1dabaf64e7f (patch)
tree7984c88cbbdc57b2b69b9f0a8bae7efc6309e110 /arch/arm/mach-highbank/highbank.c
parent50dfafcb45e17878104d94f7a479de83ec76d6b6 (diff)
uprobes: Fix prepare_uprobe() race with itself
install_breakpoint() is called under mm->mmap_sem, this protects set_swbp() but not prepare_uprobe(). Two or more different tasks can call install_breakpoint()->prepare_uprobe() at the same time, this leads to numerous problems if UPROBE_COPY_INSN is not set. Just for example, the second copy_insn() can corrupt the already analyzed/fixuped uprobe->arch.insn and race with handle_swbp(). This patch simply adds uprobe->copy_mutex to serialize this code. We could probably reuse ->consumer_rwsem, but this would mean that consumer->handler() can not use mm->mmap_sem, not good. Note: this is another temporary ugly hack until we move this logic into uprobe_register(). Signed-off-by: Oleg Nesterov <> Acked-by: Srikar Dronamraju <>
Diffstat (limited to 'arch/arm/mach-highbank/highbank.c')
0 files changed, 0 insertions, 0 deletions