On Tue, Jun 4, 2024 at 10:58 AM Hagar Hemdan <hagarhem@xxxxxxxxxx> wrote: > In create_pinctrl(), pinctrl_maps_mutex is acquired before calling > add_setting(). If add_setting() returns -EPROBE_DEFER, create_pinctrl() > calls pinctrl_free(). However, pinctrl_free() attempts to acquire > pinctrl_maps_mutex, which is already held by create_pinctrl(), leading to > a potential deadlock. > > This patch resolves the issue by releasing pinctrl_maps_mutex before > calling pinctrl_free(), preventing the deadlock. > > This bug was discovered and resolved using Coverity Static Analysis > Security Testing (SAST) by Synopsys, Inc. > > Fixes: 42fed7ba44e4 ("pinctrl: move subsystem mutex to pinctrl_dev struct") > Suggested-by: Maximilian Heyne <mheyne@xxxxxxxxx> > Signed-off-by: Hagar Hemdan <hagarhem@xxxxxxxxxx> Looks like a real issue so patch applied for fixes. Yours, Linus Walleij