uti: fix syscall response is mis-consumed by __do_in_kernel_irq_syscall

Refs: #1617
Change-Id: Iddd8ccd81d7f692f1f45ec888d31c2a87ec521ce
This commit is contained in:
Masamichi Takagi
2021-02-24 16:53:56 +09:00
committed by Masamichi Takagi
parent afea6af667
commit 35296c8210
2 changed files with 4 additions and 2 deletions

View File

@ -244,6 +244,7 @@ long do_syscall(struct syscall_request *req, int cpu)
#define STATUS_COMPLETED 1
#define STATUS_PAGE_FAULT 3
#define STATUS_SYSCALL 4
#define __NR_syscall_response 8001
while (smp_load_acquire(&res.status) != STATUS_COMPLETED) {
while (smp_load_acquire(&res.status) == STATUS_IN_PROGRESS) {
struct cpu_local_var *v;
@ -372,7 +373,7 @@ long do_syscall(struct syscall_request *req, int cpu)
}
/* send result */
req2.number = __NR_mmap;
req2.number = __NR_syscall_response;
req2.args[1] = syscall_ret;
/* The current thread is the requester and only the waiting thread
* may serve the request */