dmaengine: idxd: make misc interrupt one shot
authorDave Jiang <dave.jiang@intel.com>
Fri, 7 Apr 2023 20:31:28 +0000 (13:31 -0700)
committerVinod Koul <vkoul@kernel.org>
Wed, 12 Apr 2023 17:48:44 +0000 (23:18 +0530)
commit0c40bfb4c2dfad00a15337bb6213f92a797e3695
treed6537ecd8c441e12c8496143322b1a434b299c63
parentc9566127f021c891e14c937b1b711874b7880e48
dmaengine: idxd: make misc interrupt one shot

Current code continuously processes the interrupt as long as the hardware
is setting the status bit. There's no reason to do that since the threaded
handler will get called again if another interrupt is asserted.

Also through testing, it has shown that if a misprogrammed (or malicious)
agent can continuously submit descriptors with bad completion record and
causes errors to be reported via the misc interrupt. Continuous processing
by the thread can cause software hang watchdog to kick off since the thread
isn't giving up the CPU.

Reported-by: Sanjay Kumar <sanjay.k.kumar@intel.com>
Tested-by: Tony Zhu <tony.zhu@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Co-developed-by: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Link: https://lore.kernel.org/r/20230407203143.2189681-2-fenghua.yu@intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/idxd/irq.c