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.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,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 B7744C38A2A for ; Sun, 10 May 2020 14:50:44 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7D3942080C for ; Sun, 10 May 2020 14:50:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Nl+1U0lE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7D3942080C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:References:To:Subject:From:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=BR79Xk5DCKLxqvvyznvqQbgiei6cdoCQDNLPNc3eldI=; b=Nl+1U0lEpuIwAU CHl24XkkHqB5HE0wva7Fz3PGn1Nv7wED3b7aFE9clgDuczQieZxy2quKnFbv8sAeWFBLh8nDiQCa6 0tdEpCggpUk4iuG7lawtoR+x34lrhRlgDhES/o185MeKiOc6FuuGYjbHF6uHlUa1UJP2dXFD/wDkm heXN8kbAixdySmq3tKI/wpAHAMjO769jJn4S2aAjOAjftIThIlHogJ6xHNVkxFxGtTDcX2HImj0G5 r4qi6XBP3lgqZndZRqZIvChLW/JolIy8d43jHsh9AkehBCrHBJUCUjpM1b+g4RbfThfJIUVefN7iy NANly7myHFcE4nj0M9/g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jXnHe-0000Ag-8e; Sun, 10 May 2020 14:50:26 +0000 Received: from mail-out.m-online.net ([2001:a60:0:28:0:1:25:1]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jXnGk-0006yC-G1 for linux-arm-kernel@lists.infradead.org; Sun, 10 May 2020 14:49:41 +0000 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 49Kn5Z5ZV1z1rrVt; Sun, 10 May 2020 16:49:22 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 49Kn5Z3V2Lz1qrKt; Sun, 10 May 2020 16:49:22 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id s5e_F91k8rct; Sun, 10 May 2020 16:49:21 +0200 (CEST) X-Auth-Info: 9LnSJ1S6AjSmKm+RtiCzdDYwN2gImZ1E3M5CGUmY80Y= Received: from [127.0.0.1] (unknown [195.140.253.167]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Sun, 10 May 2020 16:49:21 +0200 (CEST) From: Marek Vasut Subject: Re: [PATCH] [RFC] genirq: Check irq_data_get_irq_chip() return value before use To: Thomas Gleixner , linux-arm-kernel@lists.infradead.org References: <20200507150729.244468-1-marex@denx.de> <87r1vvejqa.fsf@nanos.tec.linutronix.de> <05c06df8-f871-c20f-3b7e-bcfa0b5d88cd@denx.de> <875zd7e7m0.fsf@nanos.tec.linutronix.de> Message-ID: Date: Sun, 10 May 2020 16:49:20 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <875zd7e7m0.fsf@nanos.tec.linutronix.de> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200510_074932_106406_BA527C02 X-CRM114-Status: GOOD ( 19.73 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marc Zyngier , Linus Walleij , Stephen Boyd , Alexandre Torgue , Fabien Dessenne Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 5/7/20 11:51 PM, Thomas Gleixner wrote: > Marek, > > Marek Vasut writes: >> On 5/7/20 7:30 PM, Thomas Gleixner wrote: >>> Marek Vasut writes: >>>> NOTE: I don't know whether this is a correct fix. Maybe the >>>> irq_data_get_irq_chip() should never return NULL, and >>>> I have some other issue? >>> >>> What's the callchain? >> >> Hmm, I'm currently unable to replicate it on linux-next, but on 5.4.39 I >> get what's at the end of the email. >> >> On next I just noticed I get i2c: Transfer while suspended, which is >> what I suspect would be the real root cause of my problem, and why >> irq_data_get_irq_chip() returns NULL? > > Looks like. > >> Unable to handle kernel NULL pointer dereference at virtual address 00000070 >> PC is at __irq_get_irqchip_state+0x4/0x30 >> LR is at __synchronize_hardirq+0x7c/0xe8 >> [] (__irq_get_irqchip_state) from [] (__synchronize_hardirq+0x7c/0xe8) >> [] (__synchronize_hardirq) from [] (synchronize_irq+0x2c/0x9c) >> [] (synchronize_irq) from [] (suspend_device_irqs+0xd8/0xf4) >> [] (suspend_device_irqs) from [] (dpm_suspend_noirq+0x18/0x194) >> [] (dpm_suspend_noirq) from [] (suspend_devices_and_enter+0x170/0x514) >> [] (suspend_devices_and_enter) from [] (pm_suspend+0x1dc/0x278) >> [] (pm_suspend) from [] (state_store+0x9c/0xcc) >> [] (state_store) from [] (kernfs_fop_write+0x124/0x1e0) >> [] (kernfs_fop_write) from [] (__vfs_write+0x2c/0xe8) >> [] (__vfs_write) from [] (vfs_write+0x98/0xbc) >> [] (vfs_write) from [] (ksys_write+0x74/0xc4) >> [] (ksys_write) from [] (ret_fast_syscall+0x0/0x54) > > I assume that the i2c controller in question tears down the interrupt on > suspend. The changelog of that i2c driver should give you a few hints. All right, so I found out the root cause is already fixed in next, and just needs to be backported to stable. I'll ping the patch author about that. It's this patch: 69269446ccbf ("mailbox: stm32-ipcc: Update wakeup management") I also need to revisit the regulator suspend topic next, that seems to be a separate issue after all. Sorry for the noise. That said, do you want to take this patch to add the missing check anyway or is there a reason the check is missing ? _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel