From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750944AbdIKFY6 (ORCPT ); Mon, 11 Sep 2017 01:24:58 -0400 Received: from mail-wr0-f179.google.com ([209.85.128.179]:33164 "EHLO mail-wr0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750715AbdIKFY5 (ORCPT ); Mon, 11 Sep 2017 01:24:57 -0400 X-Google-Smtp-Source: ADKCNb4crWMSngCd24PXlPb5QYH4q16l2ZX4HEWAscpuLzzeijxNJvqrYyLoixSN4z7AfoNGXn19ig== Subject: Re: [PATCH] sysrq : fix Show Regs call trace on ARM To: Jibin Xu , gregkh@linuxfoundation.org Cc: rmk+kernel@armlinux.org.uk, mingo@elte.hu, linux-arm-kernel@lists.infradead.org, riel@redhat.com, linux-kernel@vger.kernel.org References: <20170911031142.254308-1-jibin.xu@windriver.com> From: Jiri Slaby Message-ID: <8c09c309-e088-1dd6-8d6f-f8929acf0f5f@suse.cz> Date: Mon, 11 Sep 2017 07:24:54 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20170911031142.254308-1-jibin.xu@windriver.com> Content-Type: text/plain; charset=iso-8859-2 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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, -- js suse labs