From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751507AbdIKJyz (ORCPT ); Mon, 11 Sep 2017 05:54:55 -0400 Received: from mail1.windriver.com ([147.11.146.13]:63673 "EHLO mail1.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751304AbdIKJyy (ORCPT ); Mon, 11 Sep 2017 05:54:54 -0400 Subject: Re: [PATCH] sysrq : fix Show Regs call trace on ARM To: Jiri Slaby , CC: , , , , References: <20170911031142.254308-1-jibin.xu@windriver.com> <8c09c309-e088-1dd6-8d6f-f8929acf0f5f@suse.cz> From: Jibin Xu Message-ID: <5dd5bb30-15af-ab44-8b56-57c3c1d53bc4@windriver.com> Date: Mon, 11 Sep 2017 17:55:05 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <8c09c309-e088-1dd6-8d6f-f8929acf0f5f@suse.cz> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Originating-IP: [128.224.162.180] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi,Jiri: get_irq_regs() in the softirq context return NULL. thanks, Jibin Xu On 2017年09月11日 13:24, Jiri Slaby wrote: > On 09/11/2017, 05:11 AM, Jibin Xu wrote: > ... >> --- a/drivers/tty/sysrq.c >> +++ b/drivers/tty/sysrq.c >> @@ -245,8 +245,10 @@ static void sysrq_handle_showallcpus(int key) >> * architecture has no support for it: >> */ >> if (!trigger_all_cpu_backtrace()) { >> - struct pt_regs *regs = get_irq_regs(); >> + struct pt_regs *regs = NULL; >> >> + if (in_irq()) >> + regs = get_irq_regs(); > Maybe a stupid question: how does get_irq_regs() behave in the softirq > context? I.e. what about s/in_irq/in_interrupt/? > > thanks,