mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-22 07:27:12 +08:00
time/sched_clock: Use ACCESS_PRIVATE() to evaluate hrtimer::function
This dereference of sched_clock_timer::function was missed when the
hrtimer callback function pointer was marked private.
Fixes: 04257da0c9 ("hrtimers: Make callback function pointer private")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/875x95jw7q.ffs@tglx
Closes: https://lore.kernel.org/oe-kbuild-all/202601131713.KsxhXQ0M-lkp@intel.com/
This commit is contained in:
@@ -215,7 +215,7 @@ void sched_clock_register(u64 (*read)(void), int bits, unsigned long rate)
|
||||
|
||||
update_clock_read_data(&rd);
|
||||
|
||||
if (sched_clock_timer.function != NULL) {
|
||||
if (ACCESS_PRIVATE(&sched_clock_timer, function) != NULL) {
|
||||
/* update timeout for clock wrap */
|
||||
hrtimer_start(&sched_clock_timer, cd.wrap_kt,
|
||||
HRTIMER_MODE_REL_HARD);
|
||||
|
||||
Reference in New Issue
Block a user