linux-sg2042/drivers/dma/ptdma
Eric Pilmore 8ae2113702 dmaengine: ptdma: check for null desc before calling pt_cmd_callback
[ Upstream commit 9284699861 ]

Resolves a panic that can occur on AMD systems, typically during host
shutdown, after the PTDMA driver had been exercised. The issue was
the pt_issue_pending() function is mistakenly assuming that there will
be at least one descriptor in the Submitted queue when the function
is called. However, it is possible that both the Submitted and Issued
queues could be empty, which could result in pt_cmd_callback() being
mistakenly called with a NULL pointer.
Ref: Bugzilla Bug 216856.

Fixes: 6fa7e0e836 ("dmaengine: ptdma: fix concurrency issue with multiple dma transfer")
Signed-off-by: Eric Pilmore <epilmore@gigaio.com>
Link: https://lore.kernel.org/r/20230210075142.58253-1-epilmore@gigaio.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-03-10 09:33:39 +01:00
..
Kconfig
Makefile dmaengine: ptdma: Add debugfs entries for PTDMA 2021-08-29 19:14:20 +05:30
ptdma-debugfs.c dmaengine: ptdma: Add debugfs entries for PTDMA 2021-08-29 19:14:20 +05:30
ptdma-dev.c ptdma: pt_core_execute_cmd() should use spinlock 2023-02-01 08:34:25 +01:00
ptdma-dmaengine.c dmaengine: ptdma: check for null desc before calling pt_cmd_callback 2023-03-10 09:33:39 +01:00
ptdma-pci.c
ptdma.h ptdma: pt_core_execute_cmd() should use spinlock 2023-02-01 08:34:25 +01:00