Re: [PATCH] gpio: mvebu: Make use of devm_pwmchip_add

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 17, 2023 at 05:40:11PM +0300, Andy Shevchenko wrote:
> On Mon, Jul 17, 2023 at 04:27:43PM +0200, Uwe Kleine-König wrote:
> 
> > Note that irq_domain_remove() also isn't called so there is another
> > resource leak introduced by 812d47889a8e ("gpio/mvebu: Use
> > irq_domain_add_linear")
> 
> I believe it's only theoretical issue as quite likely GPIO will be used and
> hence one can't unbound it. Or unbound is unconditional? In that case we
> have much bigger issue in the kernel.

You might want to test

	echo f1018100.gpio > /sys/bus/platform/drivers/mvebu-gpio/unbind

(where f1018100.gpio is the name of one of links in
/sys/bus/platform/drivers/mvebu-gpio#) and if that succeeds you should
consider

diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
index a68f682aec01..620ab247abff 100644
--- a/drivers/gpio/gpio-mvebu.c
+++ b/drivers/gpio/gpio-mvebu.c
@@ -1306,6 +1306,7 @@ static struct platform_driver mvebu_gpio_driver = {
 	.driver		= {
 		.name		= "mvebu-gpio",
 		.of_match_table = mvebu_gpio_of_match,
+		.suppress_bind_attrs = true,
 	},
 	.probe		= mvebu_gpio_probe,
 	.suspend        = mvebu_gpio_suspend,

which prevents that path and so the leak (by not providing
/sys/bus/platform/drivers/mvebu-gpio/unbind).

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux