diff options
| author | Ma Ke <make24@iscas.ac.cn> | 2025-11-12 17:17:23 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-11-26 15:10:03 +0100 |
| commit | 6d5925b667e4ed9e77c8278cc215191d29454a3f (patch) | |
| tree | ab08df6b8689088618d5c7e774bdf70e8cd63681 /rust/helpers/cpufreq.c | |
| parent | 43cd4b634ef90c4e2ff75eaeb361786fa04c8874 (diff) | |
intel_th: Fix error handling in intel_th_output_open
intel_th_output_open() calls bus_find_device_by_devt() which
internally increments the device reference count via get_device(), but
this reference is not properly released in several error paths. When
device driver is unavailable, file operations cannot be obtained, or
the driver's open method fails, the function returns without calling
put_device(), leading to a permanent device reference count leak. This
prevents the device from being properly released and could cause
resource exhaustion over time.
Found by code review.
Cc: stable <stable@kernel.org>
Fixes: 39f4034693b7 ("intel_th: Add driver infrastructure for Intel(R) Trace Hub devices")
Signed-off-by: Ma Ke <make24@iscas.ac.cn>
Link: https://patch.msgid.link/20251112091723.35963-1-make24@iscas.ac.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'rust/helpers/cpufreq.c')
0 files changed, 0 insertions, 0 deletions
