From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796291551; b=ICFl2TdSI80CGjVYlACpuosYbGNvHfCQGG4W5hqZKqdnQJ1p1cmQ4hUihwGhXHrPoz1Z gn0rtaIdE2Q6fDKCtqGu9tMmadzQLZhMAf87S0yz4/eBT+s8gEnrlhkneOVCrIrhupC03 /bgWZOCXZxESEncTefR5mr+03UHjHzLJ6B8n+sXQuVJtKffCDpPZFPfmCBrIcxv31jmTg 2sqbYkf/48ykMDlvhJVUnzOKNh5FbaPEcuhNJwtOnb7FHwOUYdeGcXdiscm5a3PH81avt m16lFn5mfVegys+MwwOlA36phqUFsJdGUVrGk4fDahprN2XBrrs0S/61/sdb/kc03TQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796291551; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=9LR4CFqoGuB/xFN0aXUbW7wTygSpaP/P1GECm9fW22k=; b=cyRnxB6hMmJtJqJTViWsdHbhoPvyodBVj128s/PMxueWNaJguzvQ5Rf1R4A7YNf7Y8CG LYT4+uCR0rhZX2D+N7MimyIg1CbX0jC2/RGEwMiFclyiuqO2s+KUy2f23nSv9C89qeGvz HphLbTj6yxAkn9AppLUjD6rdfyw77ByQHfHlpP1aja0kC8Cpr0bWYQOZkG8a9Fv1T/weT AdeYa6EYr8LV3v6Y2GzAguMg6p7QrvwfEZIWC3dhqU6QMnoy8ZlAY+vIKKFGwl79B8T6c bn+n7ij2TKIrryAac5ACp71a8SCbZILRhLS+WrNqUxbd4Lz9fPnDbINm4vhjZ7qoc/Q== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=IPM17Epc; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9C424606A322 for ; Thu, 3 Dec 2026 09:52:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=IPM17Epc Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2A2EA1F000C1; Thu, 3 Dec 2026 09:52:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796291551; bh=9LR4CFqoGuB/xFN0aXUbW7wTygSpaP/P1GECm9fW22k=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=IPM17EpcoEIcf1L7E6F3Hp1Gg82iOeArNLtZ+UV7+harlc9Ept6ZcPjCXygFL+D2p JuCq7uoeuzAQ84B1qLEmvY+zs+yqOsmLmv2xP61AqARCQUJS04cfv4qO+EzoMQJ/3h 3jw8Rcc94umU21vW2J9RSu7I/7n28n1JeFhTuS6meWn3uD5VJ83XmCJDyo2LWbF9jp EALCpm3/i6kFrVSRdjkBEsijf+mEo0kaeOkwd8L4rvP4/f7eCGJy6b/5QF2EvppwHI Tz+DjZ+5Dy1kQWw3kWRfW2C4Drpv1ooTEmp5FIvmSaeVaOxmGaC9quZxQhwddjqBTR x4dGLfpMg0WrQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v2 1/8] irqchip/imx-intmux: Don't create parent mappings while counting channels Reply-To: sashiko-reviews@lists.linux.dev To: "Peng Fan" Cc: imx@lists.linux.dev, Frank.Li@kernel.org In-Reply-To: <20261203-imx-intmux-v2-1-a6db1eed3b5f@nxp.com> References: <20261203-imx-intmux-v2-0-a6db1eed3b5f@nxp.com> <20261203-imx-intmux-v2-1-a6db1eed3b5f@nxp.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 09:52:30 +0000 X-Mailing-List: imx@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] irqchip/imx-intmux: moving deferral to of_irq_get() leaks runtime PM state -- commit 42b78989833d0bb58e9611bbf6a028b1d276be79 Author: Peng Fan irqchip/imx-intmux: Don't create parent mappings while counting channels This commit replaces platform_irq_count() with of_irq_count() and uses of_irq_get() inside the channel loop in imx_intmux_probe() so parent IRQ mappings are not created while counting channels. > diff --git a/drivers/irqchip/irq-imx-intmux.c b/drivers/irqchip/irq-imx-i= ntmux.c > index 73926dec52abf..7552a3d0c3695 100644 > --- a/drivers/irqchip/irq-imx-intmux.c > +++ b/drivers/irqchip/irq-imx-intmux.c > @@ -204,10 +204,8 @@ static int imx_intmux_probe(struct platform_device *= pdev) > int channum; > int i, ret; > =20 > - channum =3D platform_irq_count(pdev); > - if (channum =3D=3D -EPROBE_DEFER) { > - return -EPROBE_DEFER; > - } else if (channum > CHAN_MAX_NUM) { > + channum =3D of_irq_count(np); > + if (channum > CHAN_MAX_NUM) { > dev_err(&pdev->dev, "supports up to %d multiplex channels\n", > CHAN_MAX_NUM); > return -EINVAL; > @@ -244,10 +242,12 @@ static int imx_intmux_probe(struct platform_device = *pdev) > for (i =3D 0; i < channum; i++) { > data->irqchip_data[i].chanidx =3D i; > =20 > - data->irqchip_data[i].irq =3D irq_of_parse_and_map(np, i); > + data->irqchip_data[i].irq =3D of_irq_get(np, i); > if (data->irqchip_data[i].irq <=3D 0) { > - ret =3D -EINVAL; > - dev_err(&pdev->dev, "failed to get irq\n"); > + ret =3D data->irqchip_data[i].irq; > + if (!ret) > + ret =3D -EINVAL; > + dev_err_probe(&pdev->dev, ret, "failed to get irq\n"); > goto out; > } > =20 [Severity: Medium] Does moving -EPROBE_DEFER from platform_irq_count() into of_irq_get() leak runtime PM state when probe defers? Previously, -EPROBE_DEFER returned before pm_runtime_get_noresume(), pm_runtime_set_active(), and pm_runtime_enable() ran. Now of_irq_get() jumps to the out label, which only calls clk_disable_unprepare() and leaves runtime PM enabled with usage_count set to 1. Because runtime PM remains enabled, device_unbind_cleanup() -> pm_runtime_reinit() returns early without resetting RPM_ACTIVE. On the retried probe, pm_runtime_enable() logs "Unbalanced pm_runtime_enable!" and the extra usage_count permanently prevents runtime suspend. If of_irq_get() defers on a channel after the first one, earlier channels also stay registered with chained handlers pointing to devm-freed intmux_data, causing a use-after-free. This regression is fixed later in the series by commit "irqchip/imx-intmux: Fix probe error path", so ordering that patch before this one would avoid breaking bisection and standalone stable backports. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261203-imx-intmux= -v2-0-a6db1eed3b5f@nxp.com?part=3D1