summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorNam Cao <namcao@linutronix.de>2025-02-05 11:55:16 +0100
committerIngo Molnar <mingo@kernel.org>2025-04-05 10:30:17 +0200
commit04257da0c99c9d4ff7c5bb93046482e1f7d34938 (patch)
tree56524fad9153f790e1b8e6d8434233795ed573d1 /include/linux
parent87d82cff3829733fa6838492a9215303ad98a61c (diff)
hrtimers: Make callback function pointer private
Make the struct hrtimer::function field private, to prevent users from changing this field in an unsafe way. hrtimer_update_function() should be used if the callback function needs to be changed. Signed-off-by: Nam Cao <namcao@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/all/7d0e6e0c5c59a64a9bea940051aac05d750bc0c2.1738746927.git.namcao@linutronix.de
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/hrtimer_types.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/hrtimer_types.h b/include/linux/hrtimer_types.h
index 7c5b27daa89d..8fbbb6bdf7a1 100644
--- a/include/linux/hrtimer_types.h
+++ b/include/linux/hrtimer_types.h
@@ -39,7 +39,7 @@ enum hrtimer_restart {
struct hrtimer {
struct timerqueue_node node;
ktime_t _softexpires;
- enum hrtimer_restart (*function)(struct hrtimer *);
+ enum hrtimer_restart (*__private function)(struct hrtimer *);
struct hrtimer_clock_base *base;
u8 state;
u8 is_rel;