Skip to content

Commit d94f9b0

Browse files
vcgomesgregkh
authored andcommitted
dmaengine: idxd: Fix leaking event log memory
[ Upstream commit ee66bc2 ] During the device remove process, the device is reset, causing the configuration registers to go back to their default state, which is zero. As the driver is checking if the event log support was enabled before deallocating, it will fail if a reset happened before. Do not check if the support was enabled, the check for 'idxd->evl' being valid (only allocated if the HW capability is available) is enough. Fixes: 244da66 ("dmaengine: idxd: setup event log configuration") 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-10-7ed70658a9d1@intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 027145a commit d94f9b0

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

drivers/dma/idxd/device.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -815,10 +815,6 @@ static void idxd_device_evl_free(struct idxd_device *idxd)
815815
struct device *dev = &idxd->pdev->dev;
816816
struct idxd_evl *evl = idxd->evl;
817817

818-
gencfg.bits = ioread32(idxd->reg_base + IDXD_GENCFG_OFFSET);
819-
if (!gencfg.evl_en)
820-
return;
821-
822818
mutex_lock(&evl->lock);
823819
gencfg.evl_en = 0;
824820
iowrite32(gencfg.bits, idxd->reg_base + IDXD_GENCFG_OFFSET);

0 commit comments

Comments
 (0)