diff options
author | Ingo Molnar <mingo@kernel.org> | 2018-03-29 16:03:48 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2018-03-29 16:03:48 +0200 |
commit | 2d074918fb1568f398777343ff9a28049fb86337 (patch) | |
tree | 84277c1471f6d575a9515d42a53345666addabc8 /kernel/events/hw_breakpoint.c | |
parent | 78282bec4b4a02a13b87d01fbe529396d37db926 (diff) | |
parent | f67b15037a7a50c57f72e69a6d59941ad90a0f0f (diff) | |
download | linux-2d074918fb1568f398777343ff9a28049fb86337.tar.bz2 |
Merge branch 'perf/urgent' into perf/core
Conflicts:
kernel/events/hw_breakpoint.c
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/events/hw_breakpoint.c')
-rw-r--r-- | kernel/events/hw_breakpoint.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/kernel/events/hw_breakpoint.c b/kernel/events/hw_breakpoint.c index 6253d5519cd8..6e28d2866be5 100644 --- a/kernel/events/hw_breakpoint.c +++ b/kernel/events/hw_breakpoint.c @@ -492,13 +492,9 @@ modify_user_hw_breakpoint_check(struct perf_event *bp, struct perf_event_attr *a * modify_user_hw_breakpoint - modify a user-space hardware breakpoint * @bp: the breakpoint structure to modify * @attr: new breakpoint attributes - * @triggered: callback to trigger when we hit the breakpoint - * @tsk: pointer to 'task_struct' of the process to which the address belongs */ int modify_user_hw_breakpoint(struct perf_event *bp, struct perf_event_attr *attr) { - int err; - /* * 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. @@ -510,17 +506,14 @@ int modify_user_hw_breakpoint(struct perf_event *bp, struct perf_event_attr *att else perf_event_disable(bp); - err = modify_user_hw_breakpoint_check(bp, attr, false); - - if (err) { - if (!bp->attr.disabled) - perf_event_enable(bp); + if (!attr->disabled) { + int err = modify_user_hw_breakpoint_check(bp, attr, false); - return err; - } - - if (!attr->disabled) + if (err) + return err; perf_event_enable(bp); + bp->attr.disabled = 0; + } return 0; } EXPORT_SYMBOL_GPL(modify_user_hw_breakpoint); |