mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-08-09 06:14:34 +02:00
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>
20 lines
424 B
C
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);
|