diff options
| author | Erwan Le Ray <erwan.leray@foss.st.com> | 2021-03-04 17:23:02 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-03-10 09:34:10 +0100 |
| commit | 436c97936001776f16153771ee887f125443e974 (patch) | |
| tree | 63753918b192e73083e6e41e5ae5facfe1cd96a8 /tools/perf/scripts/python | |
| parent | 12761869f0efa524348e2ae31827fd52eebf3f0d (diff) | |
| download | linux-436c97936001776f16153771ee887f125443e974.tar.gz linux-436c97936001776f16153771ee887f125443e974.zip | |
serial: stm32: fix a deadlock in set_termios
CTS/RTS GPIOs support that has been added recently to STM32 UART driver has
introduced scheduled code in a set_termios part protected by a spin lock.
This generates a potential deadlock scenario:
Chain exists of:
&irq_desc_lock_class --> console_owner --> &port_lock_key
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(&port_lock_key);
lock(console_owner);
lock(&port_lock_key);
lock(&irq_desc_lock_class);
*** DEADLOCK ***
4 locks held by stty/766:
Move the scheduled code after the spinlock.
Fixes: 6cf61b9bd7cc ("tty: serial: Add modem control gpio support for STM32 UART")
Signed-off-by: Erwan Le Ray <erwan.leray@foss.st.com>
Link: https://lore.kernel.org/r/20210304162308.8984-8-erwan.leray@foss.st.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
