tty: serial: msm_serial: avoid system lockup condition
authorJorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Mon, 10 Jun 2019 17:23:08 +0000 (19:23 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Jul 2019 05:28:51 +0000 (07:28 +0200)
commit19331fd9b8a8fa1821f3a6d1342c1ca2a499be97
tree7bd0a126aff27b7be95b8076f7806c1d7ebde7d1
parenta0b6eaedb3755263eebff30b892f3f5437f086f0
tty: serial: msm_serial: avoid system lockup condition

[ Upstream commit ba3684f99f1b25d2a30b6956d02d339d7acb9799 ]

The function msm_wait_for_xmitr can be taken with interrupts
disabled. In order to avoid a potential system lockup - demonstrated
under stress testing conditions on SoC QCS404/5 - make sure we wait
for a bounded amount of time.

Tested on SoC QCS404.

Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/tty/serial/msm_serial.c