Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

hrtimer: Add missing ACCESS_PRIVATE() for hrtimer::function

The "function" field of struct hrtimer has been changed to private, but
two instances have not been converted to use ACCESS_PRIVATE().

Convert them to use ACCESS_PRIVATE().

Fixes: 04257da0c99c ("hrtimers: Make callback function pointer private")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Nam Cao <namcao@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20250408103854.1851093-1-namcao@linutronix.de
Closes: https://lore.kernel.org/oe-kbuild-all/202504071931.vOVl13tt-lkp@intel.com/
Closes: https://lore.kernel.org/oe-kbuild-all/202504072155.5UAZjYGU-lkp@intel.com/

authored by

Nam Cao and committed by
Thomas Gleixner
2424e146 0af2f6be

+2 -2
+1 -1
include/linux/hrtimer.h
··· 345 345 if (WARN_ON_ONCE(!function)) 346 346 return; 347 347 #endif 348 - timer->function = function; 348 + ACCESS_PRIVATE(timer, function) = function; 349 349 } 350 350 351 351 /* Forward a hrtimer so it expires after now: */
+1 -1
kernel/time/hrtimer.c
··· 366 366 367 367 static void *hrtimer_debug_hint(void *addr) 368 368 { 369 - return ((struct hrtimer *) addr)->function; 369 + return ACCESS_PRIVATE((struct hrtimer *)addr, function); 370 370 } 371 371 372 372 /*