diff options
author | Sam Nobs <samuel.nobs@taitradio.com> | 2020-11-10 09:50:06 +1300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-11-12 09:32:49 +0100 |
commit | 33f16855dcb973f745c51882d0e286601ff3be2b (patch) | |
tree | f08ae232f11698405d303c2ff9e0a1feacb0dc04 /tools/lib | |
parent | f8394f232b1eab649ce2df5c5f15b0e528c92091 (diff) | |
download | linux-33f16855dcb973f745c51882d0e286601ff3be2b.tar.bz2 |
tty: serial: imx: fix potential deadlock
Enabling the lock dependency validator has revealed
that the way spinlocks are used in the IMX serial
port could result in a deadlock.
Specifically, imx_uart_int() acquires a spinlock
without disabling the interrupts, meaning that another
interrupt could come along and try to acquire the same
spinlock, potentially causing the two to wait for each
other indefinitely.
Use spin_lock_irqsave() instead to disable interrupts
upon acquisition of the spinlock.
Fixes: c974991d2620 ("tty:serial:imx: use spin_lock instead of spin_lock_irqsave in isr")
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sam Nobs <samuel.nobs@taitradio.com>
Link: https://lore.kernel.org/r/1604955006-9363-1-git-send-email-samuel.nobs@taitradio.com
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/lib')
0 files changed, 0 insertions, 0 deletions