From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 02 Aug 2012 06:42:17 +0200 (CEST) Received: from mail1.windriver.com ([147.11.146.13]:39109 "EHLO mail1.windriver.com" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S1903482Ab2HBEmJ (ORCPT ); Thu, 2 Aug 2012 06:42:09 +0200 Received: from ALA-HCA.corp.ad.wrs.com (ala-hca [147.11.189.40]) by mail1.windriver.com (8.14.5/8.14.3) with ESMTP id q724fw28020449 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Wed, 1 Aug 2012 21:42:00 -0700 (PDT) Received: from [128.224.162.155] (128.224.162.155) by ALA-HCA.corp.ad.wrs.com (147.11.189.50) with Microsoft SMTP Server (TLS) id 14.2.309.2; Wed, 1 Aug 2012 21:41:56 -0700 Message-ID: <501A05D7.5060005@windriver.com> Date: Thu, 2 Aug 2012 12:45:11 +0800 From: Fan Du User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 MIME-Version: 1.0 To: Kevin Cernekee CC: Fan Du , , , , vincent wen Subject: Re: [PATCH] MIPS: oops when show backtrace of all active cpu References: <1343878276-4108-1-git-send-email-fdu@windriver.com> In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [128.224.162.155] X-archive-position: 34019 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: fan.du@windriver.com Precedence: bulk List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: linux-mips X-List-ID: linux-mips List-subscribe: List-owner: List-post: List-archive: X-list: linux-mips Return-Path: On 2012年08月02日 12:18, Kevin Cernekee wrote: > On Wed, Aug 1, 2012 at 8:31 PM, Fan Du 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1.windriver.com ([147.11.146.13]:39109 "EHLO mail1.windriver.com" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S1903482Ab2HBEmJ (ORCPT ); Thu, 2 Aug 2012 06:42:09 +0200 Message-ID: <501A05D7.5060005@windriver.com> Date: Thu, 2 Aug 2012 12:45:11 +0800 From: Fan Du MIME-Version: 1.0 Subject: Re: [PATCH] MIPS: oops when show backtrace of all active cpu References: <1343878276-4108-1-git-send-email-fdu@windriver.com> In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-subscribe: List-owner: List-post: List-archive: Return-Path: To: Kevin Cernekee Cc: Fan Du , ralf@linux-mips.org, linux-mips@linux-mips.org, linux-kernel@vger.kernel.org, vincent wen Message-ID: <20120802044511.1kzH_Tv9ihzDeNDk3OQDlBr_2EHGtTC9a8JenIqiyE8@z> On 2012年08月02日 12:18, Kevin Cernekee wrote: > On Wed, Aug 1, 2012 at 8:31 PM, Fan Du 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