diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-18 03:13:46 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-18 03:13:46 -0700 |
commit | 7f12b72bd8532cbbfb147470f0d902260cea36ce (patch) | |
tree | c62e7f0597faebd0e04acd34b3e6038629d849af /arch/x86 | |
parent | 8864f5ee12d03afe269edeeae440744f53ea4af1 (diff) | |
parent | 52004ea7ca4c52a219362f973bfd1eb86ff668ce (diff) | |
download | blackbird-op-linux-7f12b72bd8532cbbfb147470f0d902260cea36ce.tar.gz blackbird-op-linux-7f12b72bd8532cbbfb147470f0d902260cea36ce.zip |
Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
perf evlist: Fix per thread mmap setup
perf tools: Honour the cpu list parameter when also monitoring a thread list
kprobes, x86: Disable irqs during optimized callback
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/kprobes.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/kernel/kprobes.c b/arch/x86/kernel/kprobes.c index c969fd9d1566..f1a6244d7d93 100644 --- a/arch/x86/kernel/kprobes.c +++ b/arch/x86/kernel/kprobes.c @@ -1183,12 +1183,13 @@ static void __kprobes optimized_callback(struct optimized_kprobe *op, struct pt_regs *regs) { struct kprobe_ctlblk *kcb = get_kprobe_ctlblk(); + unsigned long flags; /* This is possible if op is under delayed unoptimizing */ if (kprobe_disabled(&op->kp)) return; - preempt_disable(); + local_irq_save(flags); if (kprobe_running()) { kprobes_inc_nmissed_count(&op->kp); } else { @@ -1207,7 +1208,7 @@ static void __kprobes optimized_callback(struct optimized_kprobe *op, opt_pre_handler(&op->kp, regs); __this_cpu_write(current_kprobe, NULL); } - preempt_enable_no_resched(); + local_irq_restore(flags); } static int __kprobes copy_optimized_instructions(u8 *dest, u8 *src) |