diff options
author | Hagar Hemdan <hagarhem@amazon.com> | 2024-06-04 08:58:38 +0000 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2024-06-17 09:54:50 +0200 |
commit | adec57ff8e66aee632f3dd1f93787c13d112b7a1 (patch) | |
tree | 14b673e49edc3206d7622801024d3c3cf3f26a13 /scripts/gdb/linux/tasks.py | |
parent | 61fef29ad120d3077aeb0ef598d76822acb8c4cb (diff) |
pinctrl: fix deadlock in create_pinctrl() when handling -EPROBE_DEFER
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@amazon.de>
Signed-off-by: Hagar Hemdan <hagarhem@amazon.com>
Link: https://lore.kernel.org/r/20240604085838.3344-1-hagarhem@amazon.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'scripts/gdb/linux/tasks.py')
0 files changed, 0 insertions, 0 deletions