Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

spi: hisi-sfc-v3xx: fix potential irq race condition

We mask the irq when the command completion is timeout. This won't
stop the already running irq handler. Use sychronize_irq() after
we mask the irq, to make sure there is no running handler.

Acked-by: John Garry <john.garry@huawei.com>
Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>
Link: https://lore.kernel.org/r/1618228708-37949-2-git-send-email-yangyicong@hisilicon.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Yicong Yang and committed by
Mark Brown
4c84e42d 828b4809

+1
+1
drivers/spi/spi-hisi-sfc-v3xx.c
··· 342 342 ret = 0; 343 343 344 344 hisi_sfc_v3xx_disable_int(host); 345 + synchronize_irq(host->irq); 345 346 host->completion = NULL; 346 347 } else { 347 348 ret = hisi_sfc_v3xx_wait_cmd_idle(host);