On Fri, Jul 16, 2021 at 02:20:33PM +0200, Pali Rohár wrote:
From: Remi Pommarel repk@triplefau.lt
commit 7fbcb5da811be7d47468417c7795405058abb3da upstream.
advk_pcie_wait_pio() can be called while holding a spinlock (from pci_bus_read_config_dword()), then depends on jiffies in order to timeout while polling on PIO state registers. In the case the PIO transaction failed, the timeout will never happen and will also cause the cpu to stall.
This decrements a variable and wait instead of using jiffies.
Signed-off-by: Remi Pommarel repk@triplefau.lt Signed-off-by: Lorenzo Pieralisi lorenzo.pieralisi@arm.com Reviewed-by: Andrew Murray andrew.murray@arm.com Acked-by: Thomas Petazzoni thomas.petazzoni@bootlin.com
This is backport to 4.14 kernel. Backport of upstream commit can be done automatically by git cherry-pick command if merge.renamelimit variable is set to at least 12711.
drivers/pci/host/pci-aardvark.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
Also queued up to 4.19, thanks.
greg k-h