diff options
author | Tony Lindgren <tony@atomide.com> | 2012-09-21 13:48:01 -0700 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2012-09-21 13:48:01 -0700 |
commit | 0c9de3c52d2baed6bc2ee44885adb418152c71c4 (patch) | |
tree | e19ab2c41ae47250fd614418022b32aa783aa563 /kernel/events/hw_breakpoint.c | |
parent | 6bfc82ff589a00e5fbc12b958c649d703d273c86 (diff) | |
parent | 3c7c5dab44d6c8861bc86dab924353d8d40344f8 (diff) |
Merge branch 'for_3.7/omap5_arch_timer' of git://github.com/SantoshShilimkar/linux into devel-dt-arch-timer
Conflicts:
arch/arm/mach-omap2/timer.c
Diffstat (limited to 'kernel/events/hw_breakpoint.c')
-rw-r--r-- | kernel/events/hw_breakpoint.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/kernel/events/hw_breakpoint.c b/kernel/events/hw_breakpoint.c index bb38c4d3ee12..9a7b487c6fe2 100644 --- a/kernel/events/hw_breakpoint.c +++ b/kernel/events/hw_breakpoint.c @@ -453,7 +453,16 @@ int modify_user_hw_breakpoint(struct perf_event *bp, struct perf_event_attr *att int old_type = bp->attr.bp_type; int err = 0; - perf_event_disable(bp); + /* + * modify_user_hw_breakpoint can be invoked with IRQs disabled and hence it + * will not be possible to raise IPIs that invoke __perf_event_disable. + * So call the function directly after making sure we are targeting the + * current task. + */ + if (irqs_disabled() && bp->ctx && bp->ctx->task == current) + __perf_event_disable(bp); + else + perf_event_disable(bp); bp->attr.bp_addr = attr->bp_addr; bp->attr.bp_type = attr->bp_type; |