Commit bdb0d40
thermal: core: Free tzp copy along with the thermal zone
commit 827a075 upstream.
The object pointed to by tz->tzp may still be accessed after being
freed in thermal_zone_device_unregister(), so move the freeing of it
to the point after the removal completion has been completed at which
it cannot be accessed any more.
Fixes: 3d439b1 ("thermal/core: Alloc-copy-free the thermal zone parameters structure")
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>
Link: https://patch.msgid.link/4623516.LvFx2qVVIh@rjwysocki.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent c95538b commit bdb0d40
1 file changed
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1647 | 1647 | | |
1648 | 1648 | | |
1649 | 1649 | | |
1650 | | - | |
1651 | | - | |
1652 | | - | |
1653 | 1650 | | |
1654 | 1651 | | |
1655 | 1652 | | |
1656 | 1653 | | |
1657 | 1654 | | |
| 1655 | + | |
1658 | 1656 | | |
1659 | 1657 | | |
1660 | 1658 | | |
| |||
0 commit comments