aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests/recursion.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2023-10-25 22:45:05 +0200
committerRichard Weinberger <richard@nod.at>2024-01-05 00:29:51 +0100
commitabe4eaa8618bb36c2b33e9cdde0499296a23448c (patch)
treec1f1c3df07fbaded8ac87c696bda05532939223e /tools/testing/selftests/bpf/prog_tests/recursion.c
parent7d748f60a4b82b50bf25fad1bd42d33f049f76aa (diff)
um: time-travel: fix time corruption
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>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/recursion.c')
0 files changed, 0 insertions, 0 deletions