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.

clocksource: Don't use non-continuous clocksources as watchdog

Using a non-continuous aka untrusted clocksource as a watchdog for another
untrusted clocksource is equivalent to putting the fox in charge of the
henhouse.

That's especially true with the jiffies clocksource which depends on
interrupt delivery based on a periodic timer. Neither the frequency of that
timer is trustworthy nor the kernel's ability to react on it in a timely
manner and rearm it if it is not self rearming.

Just don't bother to deal with this. It's not worth the trouble and only
relevant to museum piece hardware.

Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260123231521.858743259@kernel.org

+7
+7
kernel/time/clocksource.c
··· 651 651 if (cs->flags & CLOCK_SOURCE_MUST_VERIFY) 652 652 continue; 653 653 654 + /* 655 + * If it's not continuous, don't put the fox in charge of 656 + * the henhouse. 657 + */ 658 + if (!(cs->flags & CLOCK_SOURCE_IS_CONTINUOUS)) 659 + continue; 660 + 654 661 /* Skip current if we were requested for a fallback. */ 655 662 if (fallback && cs == old_wd) 656 663 continue;