diff options
| author | Rafael J. Wysocki <[email protected]> | 2024-10-03 12:25:58 +0000 |
|---|---|---|
| committer | Rafael J. Wysocki <[email protected]> | 2024-10-04 17:05:08 +0000 |
| commit | a42a5839f400e929c489bb1b58f54596c4535167 (patch) | |
| tree | 91d0ce46003072d42036be9c0ca9b53ae0b71ffd /rust/helpers/workqueue.c | |
| parent | Linux 6.12-rc1 (diff) | |
| download | kernel-a42a5839f400e929c489bb1b58f54596c4535167.tar.gz kernel-a42a5839f400e929c489bb1b58f54596c4535167.zip | |
thermal: core: Reference count the zone in thermal_zone_get_by_id()
There are places in the thermal netlink code where nothing prevents
the thermal zone object from going away while being accessed after it
has been returned by thermal_zone_get_by_id().
To address this, make thermal_zone_get_by_id() get a reference on the
thermal zone device object to be returned with the help of get_device(),
under thermal_list_lock, and adjust all of its callers to this change
with the help of the cleanup.h infrastructure.
Fixes: 1ce50e7d408e ("thermal: core: genetlink support for events/cmd/sampling")
Cc: 6.8+ <[email protected]> # 6.8+
Signed-off-by: Rafael J. Wysocki <[email protected]>
Reviewed-by: Lukasz Luba <[email protected]>
Link: https://patch.msgid.link/[email protected]
Diffstat (limited to 'rust/helpers/workqueue.c')
0 files changed, 0 insertions, 0 deletions
