linux-mips
[Top] [All Lists]

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

To: Kevin Cernekee <cernekee@gmail.com>
Subject: Re: [PATCH] MIPS: oops when show backtrace of all active cpu
From: Fan Du <fan.du@windriver.com>
Date: Thu, 2 Aug 2012 12:45:11 +0800
Cc: Fan Du <fdu@windriver.com>, <ralf@linux-mips.org>, <linux-mips@linux-mips.org>, <linux-kernel@vger.kernel.org>, vincent wen <vincentwenlinux@gmail.com>
In-reply-to: <CAJiQ=7Abc2sR2E2FXmeTr_Hc+CWH+J25=juB3wL172Tn6-PYuA@mail.gmail.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> <CAJiQ=7Abc2sR2E2FXmeTr_Hc+CWH+J25=juB3wL172Tn6-PYuA@mail.gmail.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7


On 2012年08月02日 12:18, Kevin Cernekee wrote:
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/



Oh, Looks like I'm late :)
thanks anyway.


--

Love each day!
--fan

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