summaryrefslogtreecommitdiffstats
path: root/drivers/nvdimm/nd.h
diff options
context:
space:
mode:
authorLiming Sun <lsun@mellanox.com>2019-12-20 12:04:33 -0500
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>2020-01-13 11:37:50 +0200
commit638bc4ca3d28c25986cce4cbad69d9b8abf1e434 (patch)
tree1ae86522a289f23d671c1efa70103a8e77308d12 /drivers/nvdimm/nd.h
parentdbff1e07b02d11fae04dd4b1954600baee9e94cc (diff)
downloadlinux-638bc4ca3d28c25986cce4cbad69d9b8abf1e434.tar.bz2
platform/mellanox: fix potential deadlock in the tmfifo driver
This commit fixes the potential deadlock caused by the console Rx and Tx processing at the same time. Rx and Tx both take the console and tmfifo spinlock but in different order which causes potential deadlock. The fix is to use different tmfifo spinlock for Rx and Tx since they protect different resources and it's safe to split the lock. Below is the reported call trace when copying/pasting large string in the console. Rx: _raw_spin_lock_irqsave (hvc lock) __hvc_poll hvc_poll in_intr vring_interrupt mlxbf_tmfifo_rxtx_one_desc (tmfifo lock) mlxbf_tmfifo_rxtx mlxbf_tmfifo_work_rxtx Tx: _raw_spin_lock_irqsave (tmfifo lock) mlxbf_tmfifo_virtio_notify virtqueue_notify virtqueue_kick put_chars hvc_push hvc_write (hvc lock) ... do_tty_write tty_write Fixes: 1357dfd7261f ("platform/mellanox: Add TmFifo driver for Mellanox BlueField Soc") Cc: <stable@vger.kernel.org> # 5.4+ Reviewed-by: David Woods <dwoods@mellanox.com> Signed-off-by: Liming Sun <lsun@mellanox.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'drivers/nvdimm/nd.h')
0 files changed, 0 insertions, 0 deletions