From: srinivas pandruvada <srinivas.pandruvada@linux.intel.com>
To: Ma Ke <make_ruc2021@163.com>,
hansg@kernel.org, ilpo.jarvinen@linux.intel.com,
sumesh.k.naduvalath@intel.com, mgross@linux.intel.com
Cc: platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
stable@vger.kernel.org
Subject: Re: [RESEND PATCH] platform/x86: ishtp_eclite: fix ACPI device reference leak in probe error path
Date: Mon, 22 Jun 2026 08:04:40 -0700 [thread overview]
Message-ID: <5f34e8cbff2c92f58831cbac9239c3251389da53.camel@linux.intel.com> (raw)
In-Reply-To: <20260622070352.689982-1-make_ruc2021@163.com>
On Mon, 2026-06-22 at 15:03 +0800, Ma Ke wrote:
Why Resend?
I like the first character after ishtp_eclite: to be upper case as the
first version of the driver (Later than convention broke). If you
happen to report for any region, you can change that.
> ecl_ishtp_cl_probe() acquires a reference to an ACPI device via
> acpi_find_eclite_device() but fails to release it in the error path
> when acpi_opregion_init() fails. This results in a reference count
> leak, preventing proper cleanup of the ACPI device.
>
Change is good.
> Calling path: acpi_find_eclite_device() ->
> acpi_dev_get_first_match_dev() -> acpi_dev_get_next_match_dev() ->
> bus_find_device() -> get_device().
>
> Found by code review.
>
> Signed-off-by: Ma Ke <make_ruc2021@163.com>
> Cc: stable@vger.kernel.org
> Fixes: 7b6bf51de974 ("platform/x86: Add Intel ishtp eclite driver")
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Thanks,
Srinivas
> ---
> drivers/platform/x86/intel/ishtp_eclite.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/platform/x86/intel/ishtp_eclite.c
> b/drivers/platform/x86/intel/ishtp_eclite.c
> index 93ac8b2dbf38..bca7e217878b 100644
> --- a/drivers/platform/x86/intel/ishtp_eclite.c
> +++ b/drivers/platform/x86/intel/ishtp_eclite.c
> @@ -600,13 +600,16 @@ static int ecl_ishtp_cl_probe(struct
> ishtp_cl_device *cl_device)
> rv = acpi_opregion_init(opr_dev);
> if (rv) {
> dev_err(cl_data_to_dev(opr_dev), "ACPI opregion init
> failed\n");
> - goto err_exit;
> + goto err_put;
> }
>
> /* Reprobe devices depending on ECLite - battery, fan, etc.
> */
> acpi_dev_clear_dependencies(opr_dev->adev);
>
> return 0;
> +
> +err_put:
> + acpi_dev_put(opr_dev->adev);
> err_exit:
> ishtp_set_connection_state(ecl_ishtp_cl,
> ISHTP_CL_DISCONNECTING);
> ishtp_cl_disconnect(ecl_ishtp_cl);
prev parent reply other threads:[~2026-06-22 15:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-22 7:03 Ma Ke
2026-06-22 15:04 ` srinivas pandruvada [this message]
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=5f34e8cbff2c92f58831cbac9239c3251389da53.camel@linux.intel.com \
--to=srinivas.pandruvada@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=make_ruc2021@163.com \
--cc=mgross@linux.intel.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=sumesh.k.naduvalath@intel.com \
/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
all inboxes | Powered by JetHome®