aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/events/hw_breakpoint.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-16 20:31:36 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-16 20:31:36 -0400
commit7ac3c93e5dd74486ca4f8f0b02ae55182658d2e5 (patch)
tree08b949c872aefbc0f8e12bdcc4dc82297bdd0f2e /kernel/events/hw_breakpoint.c
parent23666a74c9f552bc9cfef20ded1b8b29bedb80c6 (diff)
parent5698bd757d55b1bb87edd1a9744ab09c142abfc2 (diff)
Merge 3.6-rc6 into tty-next
This pulls in the fixes in 3.6-rc6 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/events/hw_breakpoint.c')
-rw-r--r--kernel/events/hw_breakpoint.c11
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
453 int old_type = bp->attr.bp_type; 453 int old_type = bp->attr.bp_type;
454 int err = 0; 454 int err = 0;
455 455
456 perf_event_disable(bp); 456 /*
457 * modify_user_hw_breakpoint can be invoked with IRQs disabled and hence it
458 * will not be possible to raise IPIs that invoke __perf_event_disable.
459 * So call the function directly after making sure we are targeting the
460 * current task.
461 */
462 if (irqs_disabled() && bp->ctx && bp->ctx->task == current)
463 __perf_event_disable(bp);
464 else
465 perf_event_disable(bp);
457 466
458 bp->attr.bp_addr = attr->bp_addr; 467 bp->attr.bp_addr = attr->bp_addr;
459 bp->attr.bp_type = attr->bp_type; 468 bp->attr.bp_type = attr->bp_type;