[PATCH OLK-6.6] dmaengine: idxd: Fix leaking event log memory
From: Vinicius Costa Gomes <vinicius.gomes@intel.com> mainline inclusion from mainline-v7.0-rc6 commit ee66bc29578391c9b48523dc9119af67bd5c7c0f category: bugfix bugzilla: https://atomgit.com/src-openeuler/kernel/issues/14183 CVE: CVE-2026-31440 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=... -------------------------------- 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: 244da66cda35 ("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-7ed... Signed-off-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Yin Tirui <yintirui@huawei.com> --- drivers/dma/idxd/device.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/dma/idxd/device.c b/drivers/dma/idxd/device.c index e356081aa317..1087a265cb70 100644 --- a/drivers/dma/idxd/device.c +++ b/drivers/dma/idxd/device.c @@ -818,10 +818,6 @@ static void idxd_device_evl_free(struct idxd_device *idxd) if (!evl) return; - gencfg.bits = ioread32(idxd->reg_base + IDXD_GENCFG_OFFSET); - if (!gencfg.evl_en) - return; - mutex_lock(&evl->lock); gencfg.evl_en = 0; iowrite32(gencfg.bits, idxd->reg_base + IDXD_GENCFG_OFFSET); -- 2.43.0
反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://atomgit.com/openeuler/kernel/merge_requests/22363 邮件列表地址:https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/CY7... FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://atomgit.com/openeuler/kernel/merge_requests/22363 Mailing list address: https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/CY7...
participants (2)
-
patchwork bot -
Yin Tirui