linux/drivers/perf/arm_cspmu
Ma Ke 970e1e4180 perf: arm_cspmu: fix error handling in arm_cspmu_impl_unregister()
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.

Found by code review.

Cc: stable@vger.kernel.org
Fixes: bfc653aa89 ("perf: arm_cspmu: Separate Arm and vendor module")
Signed-off-by: Ma Ke <make24@iscas.ac.cn>
Signed-off-by: Will Deacon <will@kernel.org>
2025-11-03 14:20:03 +00:00
..
Kconfig perf: arm_cspmu: ampere_cspmu: Add support for Ampere SoC PMU 2023-10-10 19:10:54 +01:00
Makefile perf: arm_cspmu: ampere_cspmu: Add support for Ampere SoC PMU 2023-10-10 19:10:54 +01:00
ampere_cspmu.c perf/arm_cspmu: Generalise event filtering 2025-03-13 21:35:04 +00:00
arm_cspmu.c perf: arm_cspmu: fix error handling in arm_cspmu_impl_unregister() 2025-11-03 14:20:03 +00:00
arm_cspmu.h perf/arm_cspmu: Add pmpidr support 2025-11-03 13:35:07 +00:00
nvidia_cspmu.c perf/arm_cspmu: nvidia: Add pmevfiltr2 support 2025-11-03 13:35:07 +00:00