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>] [day] [month] [year] [list]
Message-ID: <7160bd86-3061-4549-abf0-074b84f4872c@web.de>
Date: Fri, 1 Aug 2025 16:35:47 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Zhen Ni <zhen.ni@...ystack.cn>, linux-acpi@...r.kernel.org,
 Jassi Brar <jassisinghbrar@...il.com>, Sudeep Holla <sudeep.holla@....com>
Cc: LKML <linux-kernel@...r.kernel.org>, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] mailbox: pcc: Add missed acpi_put_table() to fix memory
 leak

> In pcc_mbox_probe(), the PCCT table acquired via acpi_get_table()
> is only released in error paths but not in the success path. This
> leads to a permanent ACPI memory leak when the driver successfully
> initializes.

How do you think about to add any tags (like “Fixes” and “Cc”) accordingly?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.16#n145


> The label name 'err' is no longer accurate because it handles both:
> 1. Error cases
> 2. Success case

See also:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.16#n94


…
> +++ b/drivers/mailbox/pcc.c
> @@ -763,19 +763,19 @@ static int pcc_mbox_probe(struct platform_device *pdev)
>  					 GFP_KERNEL);
>  	if (!pcc_mbox_channels) {
>  		rc = -ENOMEM;
> -		goto err;
> +		goto out_put_pcct;
>  	}
>  
>  	chan_info = devm_kcalloc(dev, count, sizeof(*chan_info), GFP_KERNEL);
>  	if (!chan_info) {
>  		rc = -ENOMEM;
> -		goto err;
> +		goto out_put_pcct;
>  	}
>  
>  	pcc_mbox_ctrl = devm_kzalloc(dev, sizeof(*pcc_mbox_ctrl), GFP_KERNEL);
>  	if (!pcc_mbox_ctrl) {
>  		rc = -ENOMEM;
> -		goto err;
> +		goto out_put_pcct;
>  	}
…

Can such exception handling be shared by using another jump target like “e_nomem”?

Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ