diff options
author | Thomas Weißschuh <[email protected]> | 2024-06-04 23:41:24 +0200 |
---|---|---|
committer | Ilpo Järvinen <[email protected]> | 2024-06-07 16:18:35 +0300 |
commit | dd637f5cd5f334d2d014872544470031415cec3b (patch) | |
tree | f374fdda141554ac62a2f861e08df16b791ba182 /tools/testing/selftests/bpf/progs/test_autoload.c | |
parent | 4894c364d502d44d7979d272aa49e3ffaf12f05c (diff) |
platform/x86: dell-pc: avoid double free and invalid unregistration
If platform_profile_register() fails it does kfree(thermal_handler) and
leaves the pointer value around.
Any call to thermal_cleanup() will try to kfree(thermal_handler) again.
This will happen right away in dell_init().
In addition, platform_profile_remove() will be called although no
profile is registered.
NULL out the thermal_handler, so thermal_cleanup() avoids the double free.
Fixes: 996ad4129810 ("platform/x86: dell-pc: Implement platform_profile")
Signed-off-by: Thomas Weißschuh <[email protected]>
Reviewed-by: Lyndon Sanche <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Ilpo Järvinen <[email protected]>
Signed-off-by: Ilpo Järvinen <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_autoload.c')
0 files changed, 0 insertions, 0 deletions