From 49353e252b966f764e7176f1a942271a1ccdebbf Mon Sep 17 00:00:00 2001 From: "Shiratori, Takehiro" Date: Thu, 29 Nov 2018 15:55:06 +0900 Subject: [PATCH] Added check of nohost to terminate_host(). Change-Id: I796a0d98b68783dad6ce04b3a80ca01db8f8eee2 Fujitsu: POSTK_DEBUG_TEMP_FIX_103 --- kernel/syscall.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/kernel/syscall.c b/kernel/syscall.c index 6fbbd6ea..2e6b2ca1 100644 --- a/kernel/syscall.c +++ b/kernel/syscall.c @@ -1437,9 +1437,15 @@ terminate_host(int pid) proc = find_process(pid, &lock); if(!proc) return; - proc->nohost = 1; - process_unlock(proc, &lock); - do_kill(cpu_local_var(current), pid, -1, SIGKILL, NULL, 0); + + if (proc->nohost != 1) { + proc->nohost = 1; + process_unlock(proc, &lock); + do_kill(cpu_local_var(current), pid, -1, SIGKILL, NULL, 0); + } + else { + process_unlock(proc, &lock); + } } void eventfd(int type)