From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 68123C10DCE for ; Wed, 18 Mar 2020 16:40:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 35B6320767 for ; Wed, 18 Mar 2020 16:40:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584549626; bh=OkwZd2A8MgxaDEJTMew3YK/buT2O4vFrK/v84vQcwCM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=m6vSxTgMWsOvphnKEyKmvv9zSueB1nqF31JDsohzKaLhT+9X+PI889OPTmFT4wtcH h45iNdFM3qRtxbsMwOq7VfxBT8o9gYD9WNUuI/++SkWQ1IWGUHMRcKBpSWYDHyy3Z0 zz+mqUqP81TUCh5xHIARHU1Ba/dzKTgyEo4BtOcA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727166AbgCRQkZ (ORCPT ); Wed, 18 Mar 2020 12:40:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:50472 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726775AbgCRQkZ (ORCPT ); Wed, 18 Mar 2020 12:40:25 -0400 Received: from localhost (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C19AF20752; Wed, 18 Mar 2020 16:40:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584549625; bh=OkwZd2A8MgxaDEJTMew3YK/buT2O4vFrK/v84vQcwCM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mLG0ypIZGTVTdHTGGGT/9GtWy10agbw64CkkGRremKQGaVJlR9P3J04i3BIK7ESgZ aUIMe0Y4gGS+m85DDyLYG1rx5k3n7KNf7g39iORoJniQzEeBWyhcDdAsIbGToGTcyR e/5c53mDwdoZQv861xZ8waxv1zgjyScBARoL9x8s= Date: Wed, 18 Mar 2020 12:40:23 -0400 From: Sasha Levin To: gregkh@linuxfoundation.org Cc: linus.walleij@linaro.org, bjorn.andersson@linaro.org, david@ixit.cz, ilina@codeaurora.org, maz@kernel.org, swboyd@chromium.org, stable@vger.kernel.org Subject: Re: FAILED: patch "[PATCH] pinctrl: qcom: Assign irq_eoi conditionally" failed to apply to 5.4-stable tree Message-ID: <20200318164023.GG4189@sasha-vm> References: <1584358449195216@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <1584358449195216@kroah.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Mon, Mar 16, 2020 at 12:34:09PM +0100, gregkh@linuxfoundation.org wrote: > >The patch below does not apply to the 5.4-stable tree. >If someone wants it applied there, or to any other stable or longterm >tree, then please email the backport, including the original git commit >id to . > >thanks, > >greg k-h > >------------------ original commit in Linus's tree ------------------ > >>From 1cada2f307665e208a486d7ac2294ed9a6f74a6f Mon Sep 17 00:00:00 2001 >From: Linus Walleij >Date: Mon, 9 Mar 2020 16:26:04 +0100 >Subject: [PATCH] pinctrl: qcom: Assign irq_eoi conditionally > >The hierarchical parts of MSM pinctrl/GPIO is only >used when the device tree has a "wakeup-parent" as >a phandle, but the .irq_eoi is anyway assigned leading >to semantic problems on elder Qualcomm chipsets. > >When the drivers/mfd/qcom-pm8xxx.c driver calls >chained_irq_exit() that call will in turn call chip->irq_eoi() >which is set to irq_chip_eoi_parent() by default on a >hierachical IRQ chip, and the parent is pinctrl-msm.c >so that will in turn unconditionally call >irq_chip_eoi_parent() again, but its parent is invalid >so we get the following crash: > > Unnable to handle kernel NULL pointer dereference at > virtual address 00000010 > pgd = (ptrval) > [00000010] *pgd=00000000 > Internal error: Oops: 5 [#1] PREEMPT SMP ARM > (...) > PC is at irq_chip_eoi_parent+0x4/0x10 > LR is at pm8xxx_irq_handler+0x1b4/0x2d8 > >If we solve this crash by avoiding to call up to >irq_chip_eoi_parent(), the machine will hang and get >reset by the watchdog, because of semantic issues, >probably inside irq_chip. > >As a solution, just assign the .irq_eoi conditionally if >we are actually using a wakeup parent. > >Cc: David Heidelberg >Cc: Bjorn Andersson >Cc: Lina Iyer >Cc: Stephen Boyd >Cc: stable@vger.kernel.org >Fixes: e35a6ae0eb3a ("pinctrl/msm: Setup GPIO chip in hierarchy") This shouldn't go in 5.4, e35a6ae0eb3a is not there. -- Thanks, Sasha