WSL2-Linux-Kernel/arch/um
Johannes Berg 0c7478a2da um: time-travel: fix time corruption
[ Upstream commit abe4eaa8618bb36c2b33e9cdde0499296a23448c ]

In 'basic' time-travel mode (without =inf-cpu or =ext), we
still get timer interrupts. These can happen at arbitrary
points in time, i.e. while in timer_read(), which pushes
time forward just a little bit. Then, if we happen to get
the interrupt after calculating the new time to push to,
but before actually finishing that, the interrupt will set
the time to a value that's incompatible with the forward,
and we'll crash because time goes backwards when we do the
forwarding.

Fix this by reading the time_travel_time, calculating the
adjustment, and doing the adjustment all with interrupts
disabled.

Reported-by: Vincent Whitchurch <Vincent.Whitchurch@axis.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-02-23 08:54:50 +01:00
..
configs um: Fix hostaudio build errors 2023-09-19 12:22:49 +02:00
drivers um: net: Fix return type of uml_net_start_xmit() 2024-02-23 08:54:50 +01:00
include um: Fix naming clash between UML and scheduler 2024-02-23 08:54:49 +01:00
kernel um: time-travel: fix time corruption 2024-02-23 08:54:50 +01:00
os-Linux um: Don't use vfprintf() for os_info() 2024-02-23 08:54:49 +01:00
scripts
.gitignore um: gitignore: Add kernel/capflags.c 2022-01-27 11:05:34 +01:00
Kbuild kbuild: require all architectures to have arch/$(SRCARCH)/Kbuild 2021-05-26 23:10:37 +09:00
Kconfig um/cpu: Switch to arch_cpu_finalize_init() 2023-08-08 19:58:31 +02:00
Kconfig.debug um: Disable CONFIG_GCOV with MODULES 2021-04-15 23:10:33 +02:00
Makefile um: Use HOST_DIR for mrproper 2023-07-23 13:47:33 +02:00
Makefile-os-Linux
Makefile-skas