Skip to content

Commit 6ff1020

Browse files
committed
Merge tag 'timers-urgent-2026-03-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer fix from Ingo Molnar: "Make clock_adjtime() syscall timex validation slightly more permissive for auxiliary clocks, to not reject syscalls based on the status field that do not try to modify the status field. This makes the ABI behavior in clock_adjtime() consistent with CLOCK_REALTIME" * tag 'timers-urgent-2026-03-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: timekeeping: Fix timex status validation for auxiliary clocks
2 parents b1b9a9d + e48a869 commit 6ff1020

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

kernel/time/timekeeping.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2653,15 +2653,17 @@ static int timekeeping_validate_timex(const struct __kernel_timex *txc, bool aux
26532653

26542654
if (aux_clock) {
26552655
/* Auxiliary clocks are similar to TAI and do not have leap seconds */
2656-
if (txc->status & (STA_INS | STA_DEL))
2656+
if (txc->modes & ADJ_STATUS &&
2657+
txc->status & (STA_INS | STA_DEL))
26572658
return -EINVAL;
26582659

26592660
/* No TAI offset setting */
26602661
if (txc->modes & ADJ_TAI)
26612662
return -EINVAL;
26622663

26632664
/* No PPS support either */
2664-
if (txc->status & (STA_PPSFREQ | STA_PPSTIME))
2665+
if (txc->modes & ADJ_STATUS &&
2666+
txc->status & (STA_PPSFREQ | STA_PPSTIME))
26652667
return -EINVAL;
26662668
}
26672669

0 commit comments

Comments
 (0)