Commit e48a869
timekeeping: Fix timex status validation for auxiliary clocks
The timekeeping_validate_timex() function validates the timex status
of an auxiliary system clock even when the status is not to be changed,
which causes unexpected errors for applications that make read-only
clock_adjtime() calls, or set some other timex fields, but without
clearing the status field.
Do the AUX-specific status validation only when the modes field contains
ADJ_STATUS, i.e. the application is actually trying to change the
status. This makes the AUX-specific clock_adjtime() behavior consistent
with CLOCK_REALTIME.
Fixes: 4eca49d ("timekeeping: Prepare do_adtimex() for auxiliary clocks")
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260225085231.276751-1-mlichvar@redhat.com1 parent 11439c4 commit e48a869
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2653 | 2653 | | |
2654 | 2654 | | |
2655 | 2655 | | |
2656 | | - | |
| 2656 | + | |
| 2657 | + | |
2657 | 2658 | | |
2658 | 2659 | | |
2659 | 2660 | | |
2660 | 2661 | | |
2661 | 2662 | | |
2662 | 2663 | | |
2663 | 2664 | | |
2664 | | - | |
| 2665 | + | |
| 2666 | + | |
2665 | 2667 | | |
2666 | 2668 | | |
2667 | 2669 | | |
| |||
0 commit comments