[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMuHMdXrLmBOFg-9soCYD+hAcW9hXCbtM5NkLb1Pa2SJ6bxSyg@mail.gmail.com>
Date: Mon, 29 Jan 2024 17:13:09 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Claudiu <claudiu.beznea@...on.dev>
Cc: linus.walleij@...aro.org, linux-renesas-soc@...r.kernel.org,
linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
dan.carpenter@...aro.org, Claudiu Beznea <claudiu.beznea.uj@...renesas.com>
Subject: Re: [PATCH] pinctrl: renesas: rzg2l: Fix locking in rzg2l_dt_subnode_to_map()
On Mon, Jan 15, 2024 at 4:35 PM Claudiu <claudiu.beznea@...on.dev> wrote:
> From: Claudiu Beznea <claudiu.beznea.uj@...renesas.com>
>
> Commit d3aaa7203a17 ("pinctrl: renesas: rzg2l: Add pin configuration
> support for pinmux groups") introduced the possibility to parse pin
> configuration for pinmux groups. It did that by calling
> rzg2l_map_add_config() at the end of rzg2l_dt_subnode_to_map() and
> jumping to the remove_group label in case rzg2l_map_add_config() failed.
> But if that happens, the mutex will already be unlocked, thus this it will
> lead to double mutex unlock operation. To fix this move the
> rzg2l_map_add_config() call just after all the name argument is ready and
> before the mutex is locked. There is no harm in doing this, as this only
> parses the data from device tree that will be further processed by
> pinctrl core code.
>
> Fixes: d3aaa7203a17 ("pinctrl: renesas: rzg2l: Add pin configuration support for pinmux groups")
> Reported-by: Dan Carpenter <dan.carpenter@...aro.org>
Closes: https://lore.kernel.org/all/f8c3a3a0-7c48-4e40-8af0-ed4e9d9b049f@moroto.mountain
> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@...renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@...der.be>
i.e. will queue in renesas-pinctrl for v6.9.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68korg
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists