linux-mips
[Top] [All Lists]

Re: [PATCH] MIPS: oops when show backtrace of all active cpu

To: Fan Du <fdu@windriver.com>
Subject: Re: [PATCH] MIPS: oops when show backtrace of all active cpu
From: Kevin Cernekee <cernekee@gmail.com>
Date: Wed, 1 Aug 2012 21:18:28 -0700
Cc: ralf@linux-mips.org, linux-mips@linux-mips.org, linux-kernel@vger.kernel.org, vincent wen <vincentwenlinux@gmail.com>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=rPrqCzCQ6UuE9wlIutn/wDwkoOimdA/B2kqha8qkhDA=; b=U7i9MPMTbRMMsV8oB3GEFyPEUpDPWYCgB5rs/+wJUJ/U94YfXko41o+H0gQ8FCJ28m TpQaIsDDKY73M37FECbIaoYrY2reCDZ2qN2ewGyWqHtgNRuffOMi96biJQ3OrqczwNgV XApK8SLbrYcqwNb3i2Y3cw6q1Igu6DuJvPynEbCDwJlkyF05pK/vokvWK7092PHDsUtC TxjpHS+Ron7PKeNjixhAjRZTLI4v/oFWvo4N2UHhH8znC0KchQ3cuFIspA7qKeD1CW84 q+J/crzefNwTVjwpd/lRwybbVfQjl2Yu16oeNASAUYnGvLQ26SXEx1agEtq8bZs7GGWv Q5pA==
In-reply-to: <1343878276-4108-1-git-send-email-fdu@windriver.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
References: <1343878276-4108-1-git-send-email-fdu@windriver.com>
Sender: linux-mips-bounce@linux-mips.org
On Wed, Aug 1, 2012 at 8:31 PM, Fan Du <fdu@windriver.com> wrote:
> show_backtrace must have an valid task when calling unwind_stack,
> so fix it by checking first.
[...]
> --- a/arch/mips/kernel/traps.c
> +++ b/arch/mips/kernel/traps.c
> @@ -151,6 +151,10 @@ static void show_backtrace(struct task_struct *task, 
> const struct pt_regs *regs)
>                 show_raw_backtrace(sp);
>                 return;
>         }
> +
> +       if (task == NULL)
> +               task = current;
> +
>         printk("Call Trace:\n");
>         do {
>                 print_ip_sym(pc);

FYI, a slightly different version of this change was accepted:

https://patchwork.linux-mips.org/patch/3524/

<Prev in Thread] Current Thread [Next in Thread>