Skip to content

Commit

Permalink
kdb: Fix early debugging crash regression
Browse files Browse the repository at this point in the history
The kdb_current legally be equal to NULL in the early boot of the x86
arch.  The problem pcan be observed by booting with the kernel arguments:

    earlyprintk=vga ekgdboc=kbd kgdbwait

The kdb shell will oops on entry and recursively fault because it
cannot get past the final stage of shell initialization.

Signed-off-by: Jason Wessel <[email protected]>
  • Loading branch information
jwessel committed Oct 29, 2010
1 parent 834b296 commit 578bd4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/debug/kdb/kdb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,7 @@ static int kdb_local(kdb_reason_t reason, int error, struct pt_regs *regs,
/* special case below */
} else {
kdb_printf("\nEntering kdb (current=0x%p, pid %d) ",
kdb_current, kdb_current->pid);
kdb_current, kdb_current ? kdb_current->pid : 0);
#if defined(CONFIG_SMP)
kdb_printf("on processor %d ", raw_smp_processor_id());
#endif
Expand Down

0 comments on commit 578bd4d

Please sign in to comment.