else
perf_event_disable(bp);
- err = modify_user_hw_breakpoint_check(bp, attr, false);
- bp->attr.bp_addr = attr->bp_addr;
- bp->attr.bp_type = attr->bp_type;
- bp->attr.bp_len = attr->bp_len;
- bp->attr.disabled = 1;
--
- if (err) {
- if (!bp->attr.disabled)
- perf_event_enable(bp);
+ if (!attr->disabled) {
- int err = validate_hw_breakpoint(bp);
++ 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);