linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pinctrl: at91-pio4: fix domain name assignment
@ 2023-02-24 13:08 Johan Hovold
  2023-02-24 16:44 ` Claudiu.Beznea
  2023-03-06 13:56 ` Linus Walleij
  0 siblings, 2 replies; 3+ messages in thread
From: Johan Hovold @ 2023-02-24 13:08 UTC (permalink / raw)
  To: Ludovic Desroches, Linus Walleij
  Cc: Nicolas Ferre, Alexandre Belloni, Claudiu Beznea, Thomas Gleixner,
	Marc Zyngier, linux-arm-kernel, linux-gpio, linux-kernel,
	Johan Hovold, stable

Since commit d59f6617eef0 ("genirq: Allow fwnode to carry name
information only") an IRQ domain is always given a name during
allocation (e.g. used for the debugfs entry).

Drop the no longer valid name assignment, which would lead to an attempt
to free a string constant when removing the domain on late probe
failures (e.g. probe deferral).

Fixes: d59f6617eef0 ("genirq: Allow fwnode to carry name information only")
Cc: stable@vger.kernel.org	# 4.13
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/pinctrl/pinctrl-at91-pio4.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/pinctrl/pinctrl-at91-pio4.c b/drivers/pinctrl/pinctrl-at91-pio4.c
index 39b233f73e13..d699588677a5 100644
--- a/drivers/pinctrl/pinctrl-at91-pio4.c
+++ b/drivers/pinctrl/pinctrl-at91-pio4.c
@@ -1206,7 +1206,6 @@ static int atmel_pinctrl_probe(struct platform_device *pdev)
 		dev_err(dev, "can't add the irq domain\n");
 		return -ENODEV;
 	}
-	atmel_pioctrl->irq_domain->name = "atmel gpio";
 
 	for (i = 0; i < atmel_pioctrl->npins; i++) {
 		int irq = irq_create_mapping(atmel_pioctrl->irq_domain, i);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] pinctrl: at91-pio4: fix domain name assignment
  2023-02-24 13:08 [PATCH] pinctrl: at91-pio4: fix domain name assignment Johan Hovold
@ 2023-02-24 16:44 ` Claudiu.Beznea
  2023-03-06 13:56 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Claudiu.Beznea @ 2023-02-24 16:44 UTC (permalink / raw)
  To: johan+linaro, Ludovic.Desroches, linus.walleij
  Cc: Nicolas.Ferre, alexandre.belloni, tglx, maz, linux-arm-kernel,
	linux-gpio, linux-kernel, stable

On 24.02.2023 15:08, Johan Hovold wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> Since commit d59f6617eef0 ("genirq: Allow fwnode to carry name
> information only") an IRQ domain is always given a name during
> allocation (e.g. used for the debugfs entry).
> 
> Drop the no longer valid name assignment, which would lead to an attempt
> to free a string constant when removing the domain on late probe
> failures (e.g. probe deferral).
> 
> Fixes: d59f6617eef0 ("genirq: Allow fwnode to carry name information only")
> Cc: stable@vger.kernel.org      # 4.13
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>

Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Tested-by: Claudiu Beznea <claudiu.beznea@microchip.com> # on SAMA7G5


> ---
>  drivers/pinctrl/pinctrl-at91-pio4.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/pinctrl/pinctrl-at91-pio4.c b/drivers/pinctrl/pinctrl-at91-pio4.c
> index 39b233f73e13..d699588677a5 100644
> --- a/drivers/pinctrl/pinctrl-at91-pio4.c
> +++ b/drivers/pinctrl/pinctrl-at91-pio4.c
> @@ -1206,7 +1206,6 @@ static int atmel_pinctrl_probe(struct platform_device *pdev)
>                 dev_err(dev, "can't add the irq domain\n");
>                 return -ENODEV;
>         }
> -       atmel_pioctrl->irq_domain->name = "atmel gpio";
> 
>         for (i = 0; i < atmel_pioctrl->npins; i++) {
>                 int irq = irq_create_mapping(atmel_pioctrl->irq_domain, i);
> --
> 2.39.2
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] pinctrl: at91-pio4: fix domain name assignment
  2023-02-24 13:08 [PATCH] pinctrl: at91-pio4: fix domain name assignment Johan Hovold
  2023-02-24 16:44 ` Claudiu.Beznea
@ 2023-03-06 13:56 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2023-03-06 13:56 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Ludovic Desroches, Nicolas Ferre, Alexandre Belloni,
	Claudiu Beznea, Thomas Gleixner, Marc Zyngier, linux-arm-kernel,
	linux-gpio, linux-kernel, stable

On Fri, Feb 24, 2023 at 2:09 PM Johan Hovold <johan+linaro@kernel.org> wrote:

> Since commit d59f6617eef0 ("genirq: Allow fwnode to carry name
> information only") an IRQ domain is always given a name during
> allocation (e.g. used for the debugfs entry).
>
> Drop the no longer valid name assignment, which would lead to an attempt
> to free a string constant when removing the domain on late probe
> failures (e.g. probe deferral).
>
> Fixes: d59f6617eef0 ("genirq: Allow fwnode to carry name information only")
> Cc: stable@vger.kernel.org      # 4.13
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>

Thanks Johan, patch applied for fixes.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-06 13:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-24 13:08 [PATCH] pinctrl: at91-pio4: fix domain name assignment Johan Hovold
2023-02-24 16:44 ` Claudiu.Beznea
2023-03-06 13:56 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).