Re: FAILED: patch "[PATCH] platform/mellanox: fix potential deadlock in the tmfifo" failed to apply to 5.5-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Feb 09, 2020 at 12:39:11PM +0100, gregkh@xxxxxxxxxxxxxxxxxxx wrote:

The patch below does not apply to the 5.5-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@xxxxxxxxxxxxxxx>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 3454eeeebd115891f34aa2e76eccf08c9b0882bb Mon Sep 17 00:00:00 2001
From: Liming Sun <lsun@xxxxxxxxxxxx>
Date: Fri, 20 Dec 2019 12:04:33 -0500
Subject: [PATCH] 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@xxxxxxxxxxxxxxx> # 5.4+
Reviewed-by: David Woods <dwoods@xxxxxxxxxxxx>
Signed-off-by: Liming Sun <lsun@xxxxxxxxxxxx>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>

It looks to me like this commit went in through two different trees:

638bc4ca3d28 ("platform/mellanox: fix potential deadlock in the tmfifo driver")
3454eeeebd11 ("platform/mellanox: fix potential deadlock in the tmfifo driver")

They are identical, so one probably got cleaned up in a merge commit.

Anyway, 3454eeeebd11 is in both 5.4 and 5.5, so nothing to do here.

--
Thanks,
Sasha



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux