diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/hw_breakpoint.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/hw_breakpoint.c b/kernel/hw_breakpoint.c index 50dbd5999588..c030ae657f20 100644 --- a/kernel/hw_breakpoint.c +++ b/kernel/hw_breakpoint.c | |||
@@ -296,6 +296,10 @@ int register_perf_hw_breakpoint(struct perf_event *bp) | |||
296 | if (!bp->attr.disabled || !bp->overflow_handler) | 296 | if (!bp->attr.disabled || !bp->overflow_handler) |
297 | ret = arch_validate_hwbkpt_settings(bp, bp->ctx->task); | 297 | ret = arch_validate_hwbkpt_settings(bp, bp->ctx->task); |
298 | 298 | ||
299 | /* if arch_validate_hwbkpt_settings() fails then release bp slot */ | ||
300 | if (ret) | ||
301 | release_bp_slot(bp); | ||
302 | |||
299 | return ret; | 303 | return ret; |
300 | } | 304 | } |
301 | 305 | ||