diff options
| -rw-r--r-- | arch/powerpc/kernel/hw_breakpoint.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/hw_breakpoint.c b/arch/powerpc/kernel/hw_breakpoint.c index 05e804cdecaa..aec9a1b1d25b 100644 --- a/arch/powerpc/kernel/hw_breakpoint.c +++ b/arch/powerpc/kernel/hw_breakpoint.c | |||
| @@ -109,8 +109,9 @@ void arch_unregister_hw_breakpoint(struct perf_event *bp) | |||
| 109 | * If the breakpoint is unregistered between a hw_breakpoint_handler() | 109 | * If the breakpoint is unregistered between a hw_breakpoint_handler() |
| 110 | * and the single_step_dabr_instruction(), then cleanup the breakpoint | 110 | * and the single_step_dabr_instruction(), then cleanup the breakpoint |
| 111 | * restoration variables to prevent dangling pointers. | 111 | * restoration variables to prevent dangling pointers. |
| 112 | * FIXME, this should not be using bp->ctx at all! Sayeth peterz. | ||
| 112 | */ | 113 | */ |
| 113 | if (bp->ctx && bp->ctx->task) | 114 | if (bp->ctx && bp->ctx->task && bp->ctx->task != ((void *)-1L)) |
| 114 | bp->ctx->task->thread.last_hit_ubp = NULL; | 115 | bp->ctx->task->thread.last_hit_ubp = NULL; |
| 115 | } | 116 | } |
| 116 | 117 | ||
