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: <8545206d-4a7d-4e0f-812b-dadf923b5b5c@web.de>
Date: Sun, 9 Mar 2025 10:10:38 +0100
From: Markus Elfring <Markus.Elfring@....de>
To: Shuai Xue <xueshuai@...ux.alibaba.com>, dmaengine@...r.kernel.org,
 Dave Jiang <dave.jiang@...el.com>, Fenghua Yu <fenghuay@...dia.com>,
 Vinicius Costa Gomes <vinicius.gomes@...el.com>,
 Vinod Koul <vkoul@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 1/9] dmaengine: idxd: fix memory leak in error handling
 path of idxd_setup_wqs()

…
> +++ b/drivers/dma/idxd/init.c
…
> @@ -203,7 +201,6 @@ static int idxd_setup_wqs(struct idxd_device *idxd)
>  		wq->enqcmds_retries = IDXD_ENQCMDS_RETRIES;
>  		wq->wqcfg = kzalloc_node(idxd->wqcfg_size, GFP_KERNEL, dev_to_node(dev));
>  		if (!wq->wqcfg) {
> -			put_device(conf_dev);
>  			rc = -ENOMEM;
>  			goto err;
>  		}

I suggest to move such an error code assignment also to the end of this function implementation.

Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ