Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2865383pxk; Mon, 28 Sep 2020 02:02:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz0CqfnNYn+yAoJ0rfCkgCGaYO6ELC7TNoQIfWopQOv9XjEvnlLVUjDg77yW5NITR0PWnTm X-Received: by 2002:aa7:c707:: with SMTP id i7mr573068edq.107.1601283747229; Mon, 28 Sep 2020 02:02:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601283747; cv=none; d=google.com; s=arc-20160816; b=HyM4GwVck6vPYqAHW/RmPky/Y7rPdvfP/2B7owKtWYNRZt6huIohqB+9nX8l1XgpwF CKMBZcF7YBlBOHuXebvxSR7CiOXzXJmW7ePBd+zLw2tdnoCDd3urDox1UFV00OoeaV1k 6fmcb+OCOzhNt7rqct8v0W3TGXsc72EQPO5nQqj9NRPay/roxW+1fR0m/sXKYsyUavZR 3LRokV1XojUKRHHvO5WFX1LBCpZ3qHrNImHljLFnpefven9bGdzioI/elnSVGSx7tCy0 s7Ul1ve1B/qV4cHQCY6bOvCw7viyz8GuFuUUF+ZUaU0TvO5JhjWWTNg9uW+6/lrqXP8Z gxCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:references:cc :to:from:subject; bh=6IeiSan8oRy3MTgnh+fs6ahq1wLxBQK7mSzLa7M6VUk=; b=yl7cQ02MkmkHExw8ty6gMUz9FePO/Gc2afP8ecxdb340TjzNaOwSAZ+L42IhKMtlLO ggvkNlwCRDjRl/It7QwMToManAwT6YIri7xbn5NXtqmRV0jeUHaOfMaca81Y2lGpmhO7 iD8OrR+O+WxiZhBUaeOiaCLnZ1vRFo1YCO8RQ8HMko7g+RSN4hi0VZTj1K7pKCbFLe3+ XxHaXmZirTz4/cf8ikEc4YAhO5xo1NYHkPajlPJrdzMzU/aeqOCJ/vb85TZev1xV93v2 p7jSv/7djIT34Hm+t8NYlF96FfgMCTdJy5HlgK+zXnHaqhsYMDrBacXUKTbQEaA0bDFD FY2w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p23si179482edw.241.2020.09.28.02.02.03; Mon, 28 Sep 2020 02:02:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726576AbgI1JA7 (ORCPT + 99 others); Mon, 28 Sep 2020 05:00:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726328AbgI1JA7 (ORCPT ); Mon, 28 Sep 2020 05:00:59 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 440FBC0613CE for ; Mon, 28 Sep 2020 02:00:59 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: gtucker) with ESMTPSA id 80B9129811D Subject: Re: [PATCH v3 16/16] ARM: Remove custom IRQ stat accounting From: Guillaume Tucker To: Marc Zyngier Cc: Valentin Schneider , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Sumit Garg , kernel-team@android.com, Florian Fainelli , Russell King , Jason Cooper , Saravana Kannan , Andrew Lunn , Catalin Marinas , Gregory Clement , Thomas Gleixner , Will Deacon , kernelci-results@groups.io, Fabio Estevam References: <20200901144324.1071694-1-maz@kernel.org> <20200901144324.1071694-17-maz@kernel.org> <875z83r08a.wl-maz@kernel.org> <3cd270a8-ddff-b3aa-5d7f-e7224deefbcc@collabora.com> Message-ID: Date: Mon, 28 Sep 2020 10:00:40 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <3cd270a8-ddff-b3aa-5d7f-e7224deefbcc@collabora.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Marc, On 24/09/2020 14:09, Guillaume Tucker wrote: > On 24/09/2020 10:29, Marc Zyngier wrote: >> Hi Guillaume, >> >> On Thu, 24 Sep 2020 10:00:09 +0100, >> Guillaume Tucker wrote: >>> >>> Hi Marc, >>> >>> On 01/09/2020 15:43, Marc Zyngier wrote: >>>> Let's switch the arm code to the core accounting, which already >>>> does everything we need. >>>> >>>> Reviewed-by: Valentin Schneider >>>> Signed-off-by: Marc Zyngier >>>> --- >>>> arch/arm/include/asm/hardirq.h | 17 ----------------- >>>> arch/arm/kernel/smp.c | 20 ++++---------------- >>>> 2 files changed, 4 insertions(+), 33 deletions(-) >>> >>> This appears to be causing a NULL pointer dereference on >>> beaglebone-black, it got bisected automatically several times. >>> None of the other platforms in the KernelCI labs appears to be >>> affected. >> >> Hmm. My bet is that because this is a UP machine running an SMP >> kernel, and I fell into the trap of forgetting about this 32bit >> configuration. >> >> I expect the following patch to fix it. Please give it a go if you can >> (I'm away at the moment and can't test much, and do not have any >> physical 32bit machine to test this on). > > OK thanks, that worked: > > https://lava.baylibre.com/scheduler/job/143170 > > I've added this fix to the kernel branch used on > staging.kernelci.org which is based on linux-next, so it will get > fully verified a bit later today. > > Guillaume > > >> diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c >> index 00327fa74b01..b4e3d336dc33 100644 >> --- a/arch/arm/kernel/smp.c >> +++ b/arch/arm/kernel/smp.c >> @@ -531,7 +531,12 @@ void show_ipi_list(struct seq_file *p, int prec) >> unsigned int cpu, i; >> >> for (i = 0; i < NR_IPI; i++) { >> - unsigned int irq = irq_desc_get_irq(ipi_desc[i]); >> + unsigned int irq; >> + >> + if (!ipi_desc[i]) >> + continue; >> + >> + irq = irq_desc_get_irq(ipi_desc[i]); >> seq_printf(p, "%*s%u: ", prec - 1, "IPI", i); >> >> for_each_online_cpu(cpu) This fix has been all tested now, with no visible side effects: https://staging.kernelci.org/test/job/kernelci/branch/staging.kernelci.org/kernel/staging-20200928.1/plan/baseline/ In the meantime, the same issue was detected (without the fix) and bisected on sun5i-a13-olinuxino-micro and landed on the same commit. A few more platforms are also impacted such as imx53-qsb as mentioned by Fabio. The commit is in your irqchip tree so I guess we should wait for you to apply the fix. If you do make a separate commit to fix the issue, please add: Reported-by: kernelci.org bot and also: Tested-by: Guillaume Tucker Thanks, Guillaume