Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 578bd4df authored by Jason Wessel's avatar Jason Wessel
Browse files

kdb: Fix early debugging crash regression



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: default avatarJason Wessel <jason.wessel@windriver.com>
parent 834b2964
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1127,7 +1127,7 @@ static int kdb_local(kdb_reason_t reason, int error, struct pt_regs *regs,
		/* special case below */
		/* special case below */
	} else {
	} else {
		kdb_printf("\nEntering kdb (current=0x%p, pid %d) ",
		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)
#if defined(CONFIG_SMP)
		kdb_printf("on processor %d ", raw_smp_processor_id());
		kdb_printf("on processor %d ", raw_smp_processor_id());
#endif
#endif