summaryrefslogtreecommitdiffstats
path: root/drivers/tty/sysrq.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2018-12-13 19:44:41 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-17 15:04:11 +0100
commitdd1f2250da95e87cb3e612858f94b14f99445a7c (patch)
tree406593c03de741fed6f29c721b69484ebcca2db5 /drivers/tty/sysrq.c
parent9c96f401e91a4358eb4a5e227c1521dea1c20127 (diff)
downloadlinux-dd1f2250da95e87cb3e612858f94b14f99445a7c.tar.gz
linux-dd1f2250da95e87cb3e612858f94b14f99445a7c.tar.bz2
linux-dd1f2250da95e87cb3e612858f94b14f99445a7c.zip
serial: sh-sci: Fix locking in sci_submit_rx()
Some callers of sci_submit_rx() hold the port spinlock, others don't. During fallback to PIO, the driver needs to obtain the port spinlock. If the lock was already held, spinlock recursion is detected, causing a deadlock: BUG: spinlock recursion on CPU#0. Fix this by adding a flag parameter to sci_submit_rx() for the caller to indicate the port spinlock is already held, so spinlock recursion can be avoided. Move the spin_lock_irqsave() up, so all DMA disable steps are protected, which is safe as the recently introduced dmaengine_terminate_async() can be called in atomic context. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/sysrq.c')
0 files changed, 0 insertions, 0 deletions