Files
linux-stable-mirror/drivers/thermal/testing/thermal_testing.h
T
Rafael J. Wysocki fb1a5dfe86 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: f6a034f2df ("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>
2026-06-24 14:59:25 +02:00

20 lines
424 B
C

/* SPDX-License-Identifier: GPL-2.0 */
#include <linux/workqueue.h>
extern struct workqueue_struct *tt_wq;
static inline void tt_queue_work(struct work_struct *work)
{
queue_work(tt_wq, work);
}
extern struct dentry *d_testing;
int tt_add_tz(void);
int tt_del_tz(const char *arg);
int tt_zone_add_trip(const char *arg);
int tt_zone_reg(const char *arg);
int tt_zone_unreg(const char *arg);
void tt_zone_cleanup(void);