Timer subsystem fixes:

 - Clear timer_base::pending_map on CPU hot-unplug, that can
   cause temporal timeout processing anomalous on the next
   hot-replug (Liang Hao)

 - Fix PID refcount leak in the posix-cpu-timers do_cpu_nanosleep()
   signal path (Cen Zhang)

 - Require (CAP_SYS_TIME) permission to set auxiliary clocks
   via aux_clock_set() (Daehyeon Ko)

 - Update offsets on sequence counter retry in
   ktime_get_update_offsets_now() (Thomas Weißschuh)

Signed-off-by: Ingo Molnar <mingo@kernel.org>
timekeeping: Update offsets on sequence counter retry in ktime_get_update_offsets_now()

The sequence counter of the cwsseq target is modified during the
sequence counter loop. If the loop retries, cwsseq will now match
but the offsets contain the values from the previous loop iteration.
These are not guaranteed to be consistent in themselves or with the
current loops "now.

Save the target's original sequence counter value so that the update
also happens on loop retries.

Fixes: 868a3e915f7f ("hrtimer: Make offset update smarter")
Signed-off-by: Thomas Weißschuh (Schneider Electric) <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20261023-timekeeping-clock_was_set_seq-v1-1-61c4c53d031c@linutronix.de
1 file changed