Skip to content

Commit 5ba95b1

Browse files
vcgomesgregkh
authored andcommitted
dmaengine: idxd: Fix crash when the event log is disabled
[ Upstream commit 52d2ede ] If reporting errors to the event log is not supported by the hardware, and an error that causes Function Level Reset (FLR) is received, the driver will try to restore the event log even if it was not allocated. Also, only try to free the event log if it was properly allocated. Fixes: 6078a31 ("dmaengine: idxd: Add idxd_device_config_save() and idxd_device_config_restore() helpers") Reviewed-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com> Link: https://patch.msgid.link/20260121-idxd-fix-flr-on-kernel-queues-v3-v3-2-7ed70658a9d1@intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org> [ Only the idxd_device_evl_free() NULL check portion was backported in v6.6. idxd_device_config_restore() does not exist in v6.6. It was introduced in 6.14. ] Signed-off-by: Wenshan Lan <jetlan9@163.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 0305e71 commit 5ba95b1

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

drivers/dma/idxd/device.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -810,6 +810,9 @@ static void idxd_device_evl_free(struct idxd_device *idxd)
810810
struct device *dev = &idxd->pdev->dev;
811811
struct idxd_evl *evl = idxd->evl;
812812

813+
if (!evl)
814+
return;
815+
813816
gencfg.bits = ioread32(idxd->reg_base + IDXD_GENCFG_OFFSET);
814817
if (!gencfg.evl_en)
815818
return;

0 commit comments

Comments
 (0)