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: <585a324d-3a88-42e0-b4bf-2e757dcf5108@intel.com>
Date: Wed, 6 Aug 2025 10:07:05 -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 2/9] dmaengine: idxd: Fix crash when the event log is
 disabled



On 8/4/25 6:27 PM, Vinicius Costa Gomes wrote:
> If reporting errors to the event log is not supported by the hardware,
> and an error that causes Field 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")
> Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@...el.com>

Reviewed-by: Dave Jiang <dave.jiang@...el.com>
> ---
>  drivers/dma/idxd/device.c | 3 +++
>  drivers/dma/idxd/init.c   | 3 ++-
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/dma/idxd/device.c b/drivers/dma/idxd/device.c
> index 5cf419fe6b4645337cf361305ca066d34763b3c2..c599a902767ee9904d75a0510a911596e35a259b 100644
> --- a/drivers/dma/idxd/device.c
> +++ b/drivers/dma/idxd/device.c
> @@ -815,6 +815,9 @@ static void idxd_device_evl_free(struct idxd_device *idxd)
>  	struct device *dev = &idxd->pdev->dev;
>  	struct idxd_evl *evl = idxd->evl;
>  
> +	if (!evl)
> +		return;
> +
>  	gencfg.bits = ioread32(idxd->reg_base + IDXD_GENCFG_OFFSET);
>  	if (!gencfg.evl_en)
>  		return;
> diff --git a/drivers/dma/idxd/init.c b/drivers/dma/idxd/init.c
> index d828d352ab008127e5e442e7072c9d5df0f2c6cf..a58b8cdbfa60ba9f00b91a737df01517885bc41a 100644
> --- a/drivers/dma/idxd/init.c
> +++ b/drivers/dma/idxd/init.c
> @@ -959,7 +959,8 @@ static void idxd_device_config_restore(struct idxd_device *idxd,
>  
>  	idxd->rdbuf_limit = idxd_saved->saved_idxd.rdbuf_limit;
>  
> -	idxd->evl->size = saved_evl->size;
> +	if (idxd->evl)
> +		idxd->evl->size = saved_evl->size;
>  
>  	for (i = 0; i < idxd->max_groups; i++) {
>  		struct idxd_group *saved_group, *group;
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ