lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8460f5bf-ca1e-408a-a497-61663ec2eb6f@intel.com>
Date: Wed, 6 Aug 2025 10:29:12 -0700
From: Dave Jiang <dave.jiang@...el.com>
To: Vinicius Costa Gomes <vinicius.gomes@...el.com>,
 Vinod Koul <vkoul@...nel.org>, Dan Williams <dan.j.williams@...el.com>,
 Fenghua Yu <fenghuay@...dia.com>
Cc: dmaengine@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 9/9] dmaengine: idxd: Fix leaking event log memory



On 8/4/25 6:28 PM, Vinicius Costa Gomes wrote:
> 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")
> Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@...el.com>

Reviewed-by: Dave Jiang <dave.jiang@...el.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 8f6afcba840ed7128259ad6b58b2fd967b0c151c..288cfd85f3a91f40ce2f8d8150830ad0628eacbe 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);
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ