diff options
author | Bartosz Golaszewski <[email protected]> | 2024-02-20 12:34:10 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2024-03-02 22:04:12 +0100 |
commit | 4e489a6e93e85726a41f85d1aaaab6f603ec2d33 (patch) | |
tree | 26fb405085b1e140a554a19fcad7a16ca11b8a09 /net/lapb/lapb_out.c | |
parent | b8a4ed3405d5f3f92a211ccc2579e54345bc3aeb (diff) |
serial: st-asc: don't get/put GPIOs in atomic context
Since commit 1f2bcb8c8ccd ("gpio: protect the descriptor label with
SRCU") gpiod_set_consumer_name() calls synchronize_srcu() which led to
a "sleeping in atomic context" smatch warning.
This function (along with gpiod_get/put() and all other GPIO APIs apart
from gpiod_get/set_value() and gpiod_direction_input/output()) should
have never been called with a spinlock taken. We're only fixing this now
as GPIOLIB has been rebuilt to use SRCU for access serialization which
uncovered this problem.
Move the calls to gpiod_get/put() outside the spinlock critical section.
Reported-by: Dan Carpenter <[email protected]>
Closes: https://lore.kernel.org/linux-gpio/[email protected]/
Signed-off-by: Bartosz Golaszewski <[email protected]>
Reviewed-by: Patrice Chotard <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'net/lapb/lapb_out.c')
0 files changed, 0 insertions, 0 deletions