]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
thermal: testing: zone: Flush work items during cleanup
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 19 Jun 2026 15:01:27 +0000 (17:01 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 24 Jun 2026 12:59:25 +0000 (14:59 +0200)
commitfb1a5dfe86d3af1e1c3ce168cf0d8d43897e0f77
tree6357231beb1b50931f0691c6db28191591895837
parentf3c4a338b5064effd9ce6d2cfd26c73daa56f1f4
thermal: testing: zone: Flush work items during cleanup

To prevent freed module code from being executed during the thermal
testing module unload, make it add a dedicated workqueue for thermal
testing work items and flush it in thermal_testing_exit().

Fixes: f6a034f2df42 ("thermal: Introduce a debugfs-based testing facility")
Link: https://sashiko.dev/#/patchset/20260605185212.2491144-1-sam.moelius%40trailofbits.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/1959388.tdWV9SEqCh@rafael.j.wysocki
[ rjw: Make variable d_command static ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/thermal/testing/command.c
drivers/thermal/testing/thermal_testing.h
drivers/thermal/testing/zone.c