]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
thermal/debugfs: Free all thermal zone debug memory on zone removal
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 25 Apr 2024 17:52:12 +0000 (19:52 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 May 2024 10:14:29 +0000 (12:14 +0200)
commitf51564e4b3992b53df79460ed5781a5330b5b1d5
tree0f8880b770d77b5726a9dc70fde93b91dcdce351
parentfc3e0076c1f82fe981d321e3a7bad4cbee542c19
thermal/debugfs: Free all thermal zone debug memory on zone removal

[ Upstream commit 72c1afffa4c645fe0e0f1c03e5f34395ed65b5f4 ]

Because thermal_debug_tz_remove() does not free all memory allocated for
thermal zone diagnostics, some of that memory becomes unreachable after
freeing the thermal zone's struct thermal_debugfs object.

Address this by making thermal_debug_tz_remove() free all of the memory
in question.

Fixes: 7ef01f228c9f ("thermal/debugfs: Add thermal debugfs information for mitigation episodes")
Cc :6.8+ <stable@vger.kernel.org> # 6.8+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/thermal/thermal_debugfs.c