Re: [PATCH 4.{9,14,16,17}] serial: sh-sci: Use spin_{try}lock_irqsave instead of open coding version

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

 



On 06/22/2018 04:15 PM, Sebastian Andrzej Siewior wrote:
On 2018-06-22 15:56:42 [+0200], Daniel Wagner wrote:
From: Daniel Wagner <daniel.wagner@xxxxxxxxxxx>

[ Upstream commit 8afb1d2c12163f77777f84616a8e9444d0050ebe ]

Commit 40f70c03e33a ("serial: sh-sci: add locking to console write
function to avoid SMP lockup") copied the strategy to avoid locking
problems in conjuncture with the console from the UART8250
driver. Instead using directly spin_{try}lock_irqsave(),
local_irq_save() followed by spin_{try}lock() was used. While this is
correct on mainline, for -rt it is a problem. spin_{try}lock() will
check if it is running in a valid context. Since the local_irq_save()
has already been executed, the context has changed and
spin_{try}lock() will complain. The reason why spin_{try}lock()
complains is that on -rt the spin locks are turned into mutexes and
therefore can sleep. Sleeping with interrupts disabled is not valid.

This change only effects RT. Usually I don't bother Greg/stable team
which changes which went upstream and help/fix RT but don't affect (as
in fix) non-RT code.
I usually add them to the RT queue and let RT-stable team pick it up. So
I would suggest I pick it up for v4.16 and it gets then picked up the
RT-stable team.
Any objections?

I don't mind for all non 4.4 versions. The 4.4 is special for me. Ben will merge the stable into the cip tree and I merge the -rt patches on top the cip-rt tree. That's why I would like to get the patch via the stable tree.



[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