mcexec_destroy_per_process_data: System calls delegation can not be terminated in error when the last process that closed /dev/mcos0 is a child process.

refs #822
This commit is contained in:
Tomoki Shirasawa
2018-02-14 16:34:08 +09:00
parent c949a894c6
commit 840acd6021

View File

@@ -367,7 +367,7 @@ static long mcexec_debug_log(ihk_os_t os, unsigned long arg)
} }
int mcexec_close_exec(ihk_os_t os); int mcexec_close_exec(ihk_os_t os);
int mcexec_destroy_per_process_data(ihk_os_t os); int mcexec_destroy_per_process_data(ihk_os_t os, int pid);
static void release_handler(ihk_os_t os, void *param) static void release_handler(ihk_os_t os, void *param)
{ {
@@ -387,7 +387,7 @@ static void release_handler(ihk_os_t os, void *param)
mcexec_close_exec(os); mcexec_close_exec(os);
mcexec_destroy_per_process_data(os); mcexec_destroy_per_process_data(os, info->pid);
memset(&isp, '\0', sizeof isp); memset(&isp, '\0', sizeof isp);
isp.msg = SCD_MSG_CLEANUP_PROCESS; isp.msg = SCD_MSG_CLEANUP_PROCESS;
@@ -1720,12 +1720,12 @@ int mcexec_create_per_process_data(ihk_os_t os)
return 0; return 0;
} }
int mcexec_destroy_per_process_data(ihk_os_t os) int mcexec_destroy_per_process_data(ihk_os_t os, int pid)
{ {
struct mcctrl_usrdata *usrdata = ihk_host_os_get_usrdata(os); struct mcctrl_usrdata *usrdata = ihk_host_os_get_usrdata(os);
struct mcctrl_per_proc_data *ppd = NULL; struct mcctrl_per_proc_data *ppd = NULL;
ppd = mcctrl_get_per_proc_data(usrdata, task_tgid_vnr(current)); ppd = mcctrl_get_per_proc_data(usrdata, pid);
if (ppd) { if (ppd) {
/* One for the reference and one for deallocation. /* One for the reference and one for deallocation.