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=-0.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 3BB48C433DF for ; Wed, 13 May 2020 20:49:48 +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 5A63D205ED for ; Wed, 13 May 2020 20:49:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="qxCOKSIK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5A63D205ED Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linutronix.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:MIME-Version:Message-ID:Date:References :In-Reply-To:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ToRb/4XVX7ZM3fICEPRndgMHt/HW63bVayeoBCrvYVg=; b=qxCOKSIK74G/KZ uh1oFMD1KVeI08c4hhJjttsSIeSLXrxUbdWRvSatfh7B7Pd1v9czwFXJ8lWPkPJ3UdwLfy6UqZe9P Ap2UFPTfs/f/eoD9LNjRXe0EyCazqNc5+PKFEnlNt7zp0Nr+3zbUtuftkg71KtbxVukVmr/Qzis5c kCeNOiKoJdgzfVwSGvVjylFSmqY5wIlk1XaodUkdWyY35zGcsRLpF3dC1gzxPnIICnCX+G1SfiZbz hvWQgjDzF40uLf9/MLIhQC1RMEWa4AI/Tgzz8TU58FNNIdbif/jd4wa8K8nrmFOqi4d/Px2Yw7A8c Mu8EyT5jKQ221ODqwJuQ==; 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 1jYyK3-0007Be-98; Wed, 13 May 2020 20:49:47 +0000 Received: from galois.linutronix.de ([2a0a:51c0:0:12e:550::1]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jYyK0-0007B6-C4 for linux-arm-kernel@lists.infradead.org; Wed, 13 May 2020 20:49:46 +0000 Received: from p5de0bf0b.dip0.t-ipconnect.de ([93.224.191.11] helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1jYyJr-00046r-8g; Wed, 13 May 2020 22:49:35 +0200 Received: by nanos.tec.linutronix.de (Postfix, from userid 1000) id 3CC63100605; Wed, 13 May 2020 22:49:33 +0200 (CEST) From: Thomas Gleixner To: Marek Vasut , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] [RFC] genirq: Check irq_data_get_irq_chip() return value before use In-Reply-To: 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> Date: Wed, 13 May 2020 22:49:33 +0200 Message-ID: <87a72b1rxe.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1, SHORTCIRCUIT=-0.0001 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200513_134944_551277_5505FA44 X-CRM114-Status: GOOD ( 17.08 ) 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 Marek, Marek Vasut writes: > On 5/7/20 11:51 PM, Thomas Gleixner wrote: > 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. Nothing to be sorry about. > That said, do you want to take this patch to add the missing check > anyway or is there a reason the check is missing ? The reason is probably that chip == NULL is unexpected at least from the initial callers. Adding a check for robustness is a good thing, but it should be done slightly different. do { chip = irq_data_get_irq_chip(data); if (WARN_ON_ONCE(!chip)) return -ENODEV; Simply because to alert the developer that this call is at the wrong place. Care to refresh it? Thanks, tglx _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel