From 034d10b1853ddef80aa84b0dbd8f5094ab30b584 Mon Sep 17 00:00:00 2001 From: Tomoki Shirasawa Date: Tue, 21 Mar 2017 20:37:17 +0900 Subject: [PATCH] When receiving a signal during fuex processing, the signal is not processed. --- arch/x86/kernel/syscall.c | 3 +++ kernel/syscall.c | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/syscall.c b/arch/x86/kernel/syscall.c index af309ba5..20be9430 100644 --- a/arch/x86/kernel/syscall.c +++ b/arch/x86/kernel/syscall.c @@ -1297,6 +1297,9 @@ done: sched_wakeup_thread(tthread, PS_STOPPED); tthread->proc->status = PS_RUNNING; } + else { + sched_wakeup_thread(tthread, PS_INTERRUPTIBLE); + } } } release_thread(tthread); diff --git a/kernel/syscall.c b/kernel/syscall.c index ef1ef983..8e522dfe 100644 --- a/kernel/syscall.c +++ b/kernel/syscall.c @@ -8595,6 +8595,7 @@ long syscall(int num, ihk_mc_user_context_t *ctx) #ifdef TRACK_SYSCALLS uint64_t t_s; #endif // TRACK_SYSCALLS + struct thread *thread = cpu_local_var(current); set_cputime(1); if(cpu_local_var(current)->proc->status == PS_EXITED && @@ -8656,8 +8657,8 @@ long syscall(int num, ihk_mc_user_context_t *ctx) l = syscall_generic_forwarding(num, ctx); } - if (num != __NR_sched_yield && - num != __NR_futex) { + if (!list_empty(&thread->sigpending) || + !list_empty(&thread->sigcommon->sigpending)) { check_signal(l, NULL, num); }