>From 17f3febd001a26aee9a75c61152b60b7e0ae1ea9 Mon Sep 17 00:00:00 2001 From: Jason Wessel Date: Fri, 24 Sep 2010 15:21:11 -0500 Subject: [PATCH] Fix null dereference when using early kgdb Signed-off-by: Jason Wessel --- kernel/hw_breakpoint.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/kernel/hw_breakpoint.c b/kernel/hw_breakpoint.c index 3b714e8..3c7ccdf 100644 --- a/kernel/hw_breakpoint.c +++ b/kernel/hw_breakpoint.c @@ -213,7 +213,7 @@ toggle_bp_slot(struct perf_event *bp, bool enable, enum bp_type_idx type, int weight) { int cpu = bp->cpu; - struct task_struct *tsk = bp->ctx->task; + struct task_struct *tsk = bp->ctx ? bp->ctx->task : NULL; /* Pinned counter cpu profiling */ if (!tsk) { -- 1.6.3.3