mcctrl/mcexec: fix per-process data reference counting

This commit is contained in:
Balazs Gerofi
2017-06-07 16:55:11 +09:00
parent fedba28a93
commit 200fe9aec4
5 changed files with 145 additions and 83 deletions

View File

@@ -1741,6 +1741,13 @@ int main(int argc, char **argv)
exit(1);
}
/* Register per-process structure in mcctrl */
if (ioctl(fd, MCEXEC_UP_CREATE_PPD) != 0) {
perror("creating mcctrl per-process structure");
close(fd);
exit(1);
}
/* Partitioned execution, obtain CPU set */
if (nr_processes > 0) {
struct get_cpu_set_arg cpu_set_arg;
@@ -2440,6 +2447,13 @@ gettid_out:
goto fork_child_sync_pipe;
}
if (ioctl(fd, MCEXEC_UP_CREATE_PPD) != 0) {
fs->status = -errno;
fprintf(stderr, "ERROR: creating PPD %s\n", dev);
goto fork_child_sync_pipe;
}
/* Reinit signals and syscall threads */
init_sigaction();