]> git.baikalelectronics.ru Git - kernel.git/commit
dmaengine: idxd: fix calling wq quiesce inside spinlock
authorDave Jiang <dave.jiang@intel.com>
Wed, 17 Nov 2021 17:03:51 +0000 (10:03 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Dec 2021 08:32:38 +0000 (09:32 +0100)
commit39bd831cf838e93a57b8ba7cf7257c135205b474
tree10fdc1febde393845d9af8c5b6203e726a366690
parent1004fc5101f70e1c7414ed54a84a7b38ee735860
dmaengine: idxd: fix calling wq quiesce inside spinlock

[ Upstream commit d35ccbcfdebf00cb8013c5ca2414592deae8a4da ]

Dan reports that smatch has found idxd_wq_quiesce() is being called inside
the idxd->dev_lock. idxd_wq_quiesce() calls wait_for_completion() and
therefore it can sleep. Move the call outside of the spinlock as it does
not need device lock.

Fixes: 731a88540b8a ("dmaengine: idxd: support reporting of halt interrupt")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/163716858508.1721911.15051495873516709923.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/dma/idxd/irq.c