Skip to content
/ linux Public

Commit 8ed7f3c

Browse files
Thomas Gleixnergregkh
authored andcommitted
time/sched_clock: Use ACCESS_PRIVATE() to evaluate hrtimer::function
[ Upstream commit 3db5306 ] This dereference of sched_clock_timer::function was missed when the hrtimer callback function pointer was marked private. Fixes: 04257da ("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/ Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 9b94124 commit 8ed7f3c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/time/sched_clock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ void sched_clock_register(u64 (*read)(void), int bits, unsigned long rate)
215215

216216
update_clock_read_data(&rd);
217217

218-
if (sched_clock_timer.function != NULL) {
218+
if (ACCESS_PRIVATE(&sched_clock_timer, function) != NULL) {
219219
/* update timeout for clock wrap */
220220
hrtimer_start(&sched_clock_timer, cd.wrap_kt,
221221
HRTIMER_MODE_REL_HARD);

0 commit comments

Comments
 (0)