Skip to content

Commit 573f9d3

Browse files
chunkeeySasha Levin
authored and
Sasha Levin
committed
Revert "um: work around sched_yield not yielding in time-travel mode"
This reverts commit da780c4 which is commit 887c5c1 upstream. Reason being that the patch depends on at least commit 0b8b266 ("um: insert scheduler ticks when userspace does not yield") in order to build. Otherwise it fails with: | /usr/bin/ld: arch/um/kernel/skas/syscall.o: in function `handle_syscall': | linux-6.12.27/arch/um/kernel/skas/syscall.c:43:(.text+0xa2): undefined | reference to `tt_extra_sched_jiffies' | collect2: error: ld returned 1 exit status The author Benjamin Berg commented: "I think it is better to just not backport commit 0b8b266 ("um: insert scheduler ticks when userspace does not yield")" Link: https://lore.kernel.org/linux-um/[email protected]/ Cc: <[email protected]> # 6.12.y Cc: Benjamin Berg <[email protected]> Signed-off-by: Christian Lamparter <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 97973d3 commit 573f9d3

File tree

2 files changed

+0
-13
lines changed

2 files changed

+0
-13
lines changed

arch/um/include/linux/time-internal.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,6 @@ extern void time_travel_not_configured(void);
8383
#define time_travel_del_event(...) time_travel_not_configured()
8484
#endif /* CONFIG_UML_TIME_TRAVEL_SUPPORT */
8585

86-
extern unsigned long tt_extra_sched_jiffies;
87-
8886
/*
8987
* Without CONFIG_UML_TIME_TRAVEL_SUPPORT this is a linker error if used,
9088
* which is intentional since we really shouldn't link it in that case.

arch/um/kernel/skas/syscall.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,6 @@ void handle_syscall(struct uml_pt_regs *r)
3131
goto out;
3232

3333
syscall = UPT_SYSCALL_NR(r);
34-
35-
/*
36-
* If no time passes, then sched_yield may not actually yield, causing
37-
* broken spinlock implementations in userspace (ASAN) to hang for long
38-
* periods of time.
39-
*/
40-
if ((time_travel_mode == TT_MODE_INFCPU ||
41-
time_travel_mode == TT_MODE_EXTERNAL) &&
42-
syscall == __NR_sched_yield)
43-
tt_extra_sched_jiffies += 1;
44-
4534
if (syscall >= 0 && syscall < __NR_syscalls) {
4635
unsigned long ret = EXECUTE_SYSCALL(syscall, regs);
4736

0 commit comments

Comments
 (0)