mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jason Wessel <jason.wessel@windriver.com>
To: torvalds@linux-foundation.org
Cc: linux-kernel@vger.kernel.org,
	kgdb-bugreport@lists.sourceforge.net,
	Jason Wessel <jason.wessel@windriver.com>
Subject: [PATCH 4/7] kdb: Fix early debugging crash regression
Date: Fri, 29 Oct 2010 13:43:38 -0500	[thread overview]
Message-ID: <1288377821-24520-5-git-send-email-jason.wessel@windriver.com> (raw)
In-Reply-To: <1288377821-24520-1-git-send-email-jason.wessel@windriver.com>

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 <jason.wessel@windriver.com>
---
 kernel/debug/kdb/kdb_main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c
index 9755ac0..37755d6 100644
--- a/kernel/debug/kdb/kdb_main.c
+++ b/kernel/debug/kdb/kdb_main.c
@@ -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
-- 
1.6.3.3


  parent reply	other threads:[~2010-10-29 18:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-29 18:43 [GIT PULL] kgdb/kdb tree for 2.6.37 Jason Wessel
2010-10-29 18:43 ` [PATCH 1/7] kdb: Add kdb kernel module sample Jason Wessel
2010-10-29 18:43 ` [PATCH 2/7] kdb: fix per_cpu command to remove supress mask Jason Wessel
2010-10-29 18:43 ` [PATCH 3/7] kgdb,arm: fix register dump Jason Wessel
2010-10-29 18:43 ` Jason Wessel [this message]
2010-10-29 18:43 ` [PATCH 5/7] debug_core,x86,blackfin: Clean up hw debug disable API Jason Wessel
2010-10-29 18:43 ` [PATCH 6/7] kgdbts: prevent re-entry to kgdbts before it unregisters Jason Wessel
2010-10-29 18:43 ` [PATCH 7/7] kgdb,ppc: Individual register get/set for ppc Jason Wessel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1288377821-24520-5-git-send-email-jason.wessel@windriver.com \
    --to=jason.wessel@windriver.com \
    --cc=kgdb-bugreport@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®