Commit 50bb9fd
thermal: core: Free thermal zone ID later during removal
commit daae9c1 upstream.
The thermal zone removal ordering is different from the thermal zone
registration rollback path ordering and the former is arguably
problematic because freeing a thermal zone ID prematurely may cause
it to be used during the registration of another thermal zone which
may fail as a result.
Prevent that from occurring by changing the thermal zone removal
ordering to reflect the thermal zone registration rollback path
ordering.
Also more the ida_destroy() call from thermal_zone_device_unregister()
to thermal_release() for consistency.
Fixes: b31ef82 ("thermal core: convert ID allocation to IDA")
Cc: All applicable <stable@vger.kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/5063934.GXAFRqVoOG@rafael.j.wysocki
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 5a43859 commit 50bb9fd
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
965 | 965 | | |
966 | 966 | | |
967 | 967 | | |
| 968 | + | |
968 | 969 | | |
969 | 970 | | |
970 | 971 | | |
| |||
1730 | 1731 | | |
1731 | 1732 | | |
1732 | 1733 | | |
1733 | | - | |
1734 | | - | |
1735 | 1734 | | |
1736 | 1735 | | |
1737 | 1736 | | |
1738 | 1737 | | |
1739 | 1738 | | |
1740 | 1739 | | |
1741 | 1740 | | |
| 1741 | + | |
| 1742 | + | |
| 1743 | + | |
1742 | 1744 | | |
1743 | 1745 | | |
1744 | 1746 | | |
| |||
0 commit comments