From: Markus Elfring <Markus.Elfring@web.de>
To: Zhen Ni <zhen.ni@easystack.cn>, linux-acpi@vger.kernel.org
Cc: stable@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
Jassi Brar <jassisinghbrar@gmail.com>,
Sudeep Holla <sudeep.holla@arm.com>
Subject: Re: [PATCH v3] mailbox: pcc: Add missed acpi_put_table() to fix memory leak
Date: Mon, 4 Aug 2025 16:06:26 +0200 [thread overview]
Message-ID: <94f2cba6-a407-4a0f-bc66-be75b4dea190@web.de> (raw)
In-Reply-To: <20250804121453.75525-1-zhen.ni@easystack.cn>
> In pcc_mbox_probe(), the PCCT table acquired via acpi_get_table() is
> only released in error paths but not in the success path. Fix a
> permanent ACPI memory leak when the driver successfully initializes. Add
> the goto label 'err_nomem'.
You may use an enumeration for your change description.
* Fix …
* Add … so that a bit of exception handling can be refined.
…> +++ b/drivers/mailbox/pcc.c
…> @@ -827,8 +821,11 @@ static int pcc_mbox_probe(struct platform_device *pdev)
…> +err_nomem:
> + rc = -ENOMEM;
> + goto err;
Please omit such a redundant statement at this proposed place.
> err:
> acpi_put_table(pcct_tbl);
> return rc;
Would a label like “put_table” become helpful here?
Regards,
Markus
next prev parent reply other threads:[~2025-08-04 14:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20250730124508.939257-1-zhen.ni@easystack.cn>
2025-08-01 14:35 ` [PATCH] mailbox: pcc: Add missed acpi_put_table() to fix memory leak Markus Elfring
[not found] ` <20250804074115.44573-1-zhen.ni@easystack.cn>
2025-08-04 8:42 ` [PATCH v2] " Markus Elfring
[not found] ` <20250804121453.75525-1-zhen.ni@easystack.cn>
2025-08-04 14:06 ` Markus Elfring [this message]
[not found] ` <20250805034829.168187-1-zhen.ni@easystack.cn>
2025-08-05 6:28 ` [PATCH v4] " Markus Elfring
2025-08-05 7:26 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=94f2cba6-a407-4a0f-bc66-be75b4dea190@web.de \
--to=markus.elfring@web.de \
--cc=jassisinghbrar@gmail.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=sudeep.holla@arm.com \
--cc=zhen.ni@easystack.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).