Revert "um: work around sched_yield not yielding in time-travel mode"
This reverts commit da780c4a07 which is
commit 887c5c12e80c8424bd471122d2e8b6b462e12874 upstream.
Reason being that the patch depends on at least commit 0b8b2668f998
("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 0b8b2668f998 ("um: insert scheduler ticks when userspace
does not yield")"
Link: https://lore.kernel.org/linux-um/8ce0b6056a9726e540f61bce77311278654219eb.camel@sipsolutions.net/
Cc: <stable@vger.kernel.org> # 6.12.y
Cc: Benjamin Berg <benjamin.berg@intel.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
cd010271a9
commit
6aac2c5476
@@ -83,8 +83,6 @@ extern void time_travel_not_configured(void);
|
||||
#define time_travel_del_event(...) time_travel_not_configured()
|
||||
#endif /* CONFIG_UML_TIME_TRAVEL_SUPPORT */
|
||||
|
||||
extern unsigned long tt_extra_sched_jiffies;
|
||||
|
||||
/*
|
||||
* Without CONFIG_UML_TIME_TRAVEL_SUPPORT this is a linker error if used,
|
||||
* which is intentional since we really shouldn't link it in that case.
|
||||
|
||||
@@ -31,17 +31,6 @@ void handle_syscall(struct uml_pt_regs *r)
|
||||
goto out;
|
||||
|
||||
syscall = UPT_SYSCALL_NR(r);
|
||||
|
||||
/*
|
||||
* If no time passes, then sched_yield may not actually yield, causing
|
||||
* broken spinlock implementations in userspace (ASAN) to hang for long
|
||||
* periods of time.
|
||||
*/
|
||||
if ((time_travel_mode == TT_MODE_INFCPU ||
|
||||
time_travel_mode == TT_MODE_EXTERNAL) &&
|
||||
syscall == __NR_sched_yield)
|
||||
tt_extra_sched_jiffies += 1;
|
||||
|
||||
if (syscall >= 0 && syscall < __NR_syscalls) {
|
||||
unsigned long ret = EXECUTE_SYSCALL(syscall, regs);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user