From: Markus Elfring <Markus.Elfring@web.de>
To: make24@iscas.ac.cn, linux-arm-kernel@lists.infradead.org,
linux-perf-users@vger.kernel.org
Cc: stable@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Besar Wicaksono" <bwicaksono@nvidia.com>,
"Ilkka Koskinen" <ilkka@os.amperecomputing.com>,
"James Clark" <james.clark@linaro.org>,
"Mark Rutland" <mark.rutland@arm.com>,
"Robin Murphy" <robin.murphy@arm.com>,
"Suzuki Poulouse" <suzuki.poulose@arm.com>,
"Uwe Kleine-König" <u.kleine-koenig@baylibre.com>,
"Will Deacon" <will@kernel.org>
Subject: Re: [PATCH] perf: arm_cspmu: fix error handling in arm_cspmu_impl_unregister()
Date: Sat, 27 Sep 2025 10:28:33 +0200 [thread overview]
Message-ID: <541009d1-b0ab-4dc8-81bb-2dd903cd3cf9@web.de> (raw)
In-Reply-To: <20250927073013.29898-1-make24@iscas.ac.cn>
> driver_find_device() calls get_device() to increment the reference
> count once a matching device is found. device_release_driver()
> releases the driver, but it does not decrease the reference count that
> was incremented by driver_find_device(). At the end of the loop, there
> is no put_device() to balance the reference count. To avoid reference
> count leakage, add put_device() to decrease the reference count.
Can a summary phrase like “Prevent reference count leaks in arm_cspmu_impl_unregister()”
be more appropriate?
Regards,
Markus
prev parent reply other threads:[~2025-09-27 8:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-27 7:30 [PATCH] perf: arm_cspmu: fix error handling in arm_cspmu_impl_unregister() Ma Ke
2025-09-27 8:28 ` Markus Elfring [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=541009d1-b0ab-4dc8-81bb-2dd903cd3cf9@web.de \
--to=markus.elfring@web.de \
--cc=akpm@linux-foundation.org \
--cc=bwicaksono@nvidia.com \
--cc=ilkka@os.amperecomputing.com \
--cc=james.clark@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=make24@iscas.ac.cn \
--cc=mark.rutland@arm.com \
--cc=robin.murphy@arm.com \
--cc=stable@vger.kernel.org \
--cc=suzuki.poulose@arm.com \
--cc=u.kleine-koenig@baylibre.com \
--cc=will@kernel.org \
/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