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=1796332653; b=hV6+hvKsY+FhXaZiDJ9Dauwk/LHn07yYKBKzlGUo4SuYjygHewqURi3V9IEibzcZXP0M W/POzqt5PT9vyOkoIk5zAh0scoj0hXft/4vqPuNaGzvkEt6cGU9QB94lA5RyylhM5JXYn mEndMyIcg4ERfb/wo8DDqSDuGGn6kWPNVZGBPjOxI9NZa+NgbTfnLiRtPOr1lS12lc7y6 xbl2Aaf93B2vuPaWnvnqz1AeAfq6eEYYWFI6J/RZKbUOEMg/mAWHQm5hf9RHZB/I5Y0Ge GhJnvPsfauLSMm7bsPro2rzabzOVowR24wc90b/2QhxVUs6I1A6UG+quTGghIKneVxA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796332653; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=E8gV7vSdCA7t8VAr4oL/sX9t2LlqZt02gcXPTl7QXlM=; b=keh4Bw7Kd9OumvimRH/bh8odYLW8UjXu67XgKTjwCyCAAGutx1LyINOPhzW5gMuuW2sn 987VxB0iRhshXrPk4J+KPy0wy10dKWRqsgekb/fAXBSt1VjhHaDV/oPXy36cmDK0p0PzD Rj9LCMo36W+cchUGBzazQQKpnYt5054Ve5eNGS8HusH4PTnVcnSzrb/BhSkIA4uYlupBh aCfbfeXPoM6auPWYF409d/CVdVtUeLs/U3bwJYZDdrX/h0aZJIZ1SvNNeJ4NCFgezdNlU arl+kHvTAD9R/Bq58RJ1ZBf3RfACgolC+MRWmLVbXBLF6Rz1ykTOTUblXufuqAEwSUQ== 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=PPF+4BSu; 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 17BBB606A322 for ; Thu, 3 Dec 2026 21:17:33 +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=PPF+4BSu Received: by smtp.kernel.org (Postfix) with ESMTPSA id D348C1F000C2; Thu, 3 Dec 2026 21:17:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796332652; bh=E8gV7vSdCA7t8VAr4oL/sX9t2LlqZt02gcXPTl7QXlM=; h=From:Subject:Reply-To:To:In-Reply-To:References:Date; b=PPF+4BSujjixW3PA8lBHda7cKkWYfEzcaFhLZRf6e5SS0VGK57OaU2dfvUhGSIi8M ZCwlVpblSBPMUZW+wr0TJDe+Bbxf/ZU1/ldvXzJuKmjgt5SIuNw9vtMjSFm4lNThVu IeffM+RcZM/vuzq9HhdnddVOKbDikmtsBr3IzA6jDUKFU8Q/eFIY1GxRFN6J2uulS3 LSaJXZxwm7PubuD0Pzm4VnZJKGzmuSIJnqB6QpJOAQa/mQPRQSeoLHm62j5iDwpb7C 4i3Up4KuBTSD10YXPw1hLoIjdiGwWKz1qSw0qIYTL5UWrSZwRFCLECdEmIJQzx1hBq zT3rvR5c9kHSg== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH 08/10] gpio: mpc8xxx: Drop stale remove callback clearing chained handler Reply-To: sashiko-reviews@lists.linux.dev To: "Lee Jones" , linux-gpio@vger.kernel.org In-Reply-To: <20261203205606.3905705-9-lee@kernel.org> References: <20261203205606.3905705-1-lee@kernel.org> <20261203205606.3905705-9-lee@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 21:17:32 +0000 X-Mailing-List: linux-gpio@vger.kernel.org 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: - [High] gpio: mpc8xxx: shared parent IRQ freed before GPIO_IMR is masked on unbind -- commit d9a4fe4701d225631d57b747b098abd12372ac63 Author: Lee Jones gpio: mpc8xxx: Drop stale remove callback clearing chained handler This commit removes mpc8xxx_remove() so that unbinding the driver relies on devres LIFO teardown instead of clearing the parent interrupt's chained handler. > diff --git a/drivers/gpio/gpio-mpc8xxx.c b/drivers/gpio/gpio-mpc8xxx.c > index 54ac69f96628e..cd1c03679cc51 100644 > --- a/drivers/gpio/gpio-mpc8xxx.c > +++ b/drivers/gpio/gpio-mpc8xxx.c > @@ -461,14 +461,6 @@ static int mpc8xxx_probe(struct platform_device *pde= v) > return 0; > } > =20 > -static void mpc8xxx_remove(struct platform_device *pdev) > -{ > - struct mpc8xxx_gpio_chip *mpc8xxx_gc =3D platform_get_drvdata(pdev); > - > - if (mpc8xxx_gc->irq) > - irq_set_chained_handler_and_data(mpc8xxx_gc->irqn, NULL, NULL); > -} > - > static int mpc8xxx_suspend(struct device *dev) > { > struct mpc8xxx_gpio_chip *mpc8xxx_gc =3D dev_get_drvdata(dev); [Severity: High] Can devres LIFO teardown now free the shared parent IRQ while GPIO_IMR still has active interrupts enabled? In mpc8xxx_probe(), devm_gpiochip_add_data() is registered before devm_request_irq() with IRQF_SHARED. On unbind, devres runs free_irq() before gpiochip_remove() clears GPIO_IMR via gpiochip_free_remaining_irqs(), violating the free_irq() requirement to mask shared interrupts first. When a sibling controller shares the level-high parent IRQ (such as gpio1 and gpio2 on LS1028A), __free_irq() leaves the line enabled across two synchronize_srcu() grace periods in gpiochip_remove(). If a GPIO line fires in that window, it stays asserted with no handler left to ack GPIO_IER. Because the sibling's mpc8xxx_gpio_irq_cascade() unconditionally returns IRQ_HANDLED, note_interrupt() never throttles the storm, trapping the CPU in a hardirq loop that can stall synchronize_srcu() and livelock unbind. Registering devm_request_irq() (or a devm action that masks GPIO_IMR) before devm_gpiochip_add_data() would ensure hardware interrupts are masked before free_irq() detaches from the shared parent IRQ. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261203205606.3905= 705-1-lee@kernel.org?part=3D8