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

Configure Feed

Select the types of activity you want to include in your feed.

dmaengine: idxd: Fix crash when the event log is disabled

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: 6078a315aec1 ("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>

authored by

Vinicius Costa Gomes and committed by
Vinod Koul
52d2edea caf91cdf

+5 -1
+3
drivers/dma/idxd/device.c
··· 831 831 struct device *dev = &idxd->pdev->dev; 832 832 struct idxd_evl *evl = idxd->evl; 833 833 834 + if (!evl) 835 + return; 836 + 834 837 gencfg.bits = ioread32(idxd->reg_base + IDXD_GENCFG_OFFSET); 835 838 if (!gencfg.evl_en) 836 839 return;
+2 -1
drivers/dma/idxd/init.c
··· 973 973 974 974 idxd->rdbuf_limit = idxd_saved->saved_idxd.rdbuf_limit; 975 975 976 - idxd->evl->size = saved_evl->size; 976 + if (idxd->evl) 977 + idxd->evl->size = saved_evl->size; 977 978 978 979 for (i = 0; i < idxd->max_groups; i++) { 979 980 struct idxd_group *saved_group, *group;