From 19ccaabc471a7b82a04f9156a27335774e320779 Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Mon, 13 Dec 2021 11:23:54 +0000 Subject: executor: ignore async flag in the non-threaded mode pkg/repro tries to clear the Threaded flag during repro simplification, so it's easier just to ignore the remaining async flags in that case - they won't be in the C repro either. Add a test to pkg/ipc to verify the new behavior. --- executor/executor.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'executor/executor.cc') diff --git a/executor/executor.cc b/executor/executor.cc index c0e2e6625..73f6053ee 100644 --- a/executor/executor.cc +++ b/executor/executor.cc @@ -871,10 +871,10 @@ void execute_one() thread_t* th = schedule_call(call_index++, call_num, copyout_index, num_args, args, input_pos, call_props); - if (call_props.async) { - if (!flag_threaded) - fail("SYZFAIL: unable to do an async call in a non-threaded mode"); + if (call_props.async && flag_threaded) { // Don't wait for an async call to finish. We'll wait at the end. + // If we're not in the threaded mode, just ignore the async flag - during repro simplification syzkaller + // will anyway try to make it non-threaded. } else if (flag_threaded) { // Wait for call completion. uint64 timeout_ms = syscall_timeout_ms + call->attrs.timeout * slowdown_scale; -- cgit mrf-deployment