The current implementation incorrectly creates a pthread in the current
process, for every new uk_thread created. This behavior is problematic
because during a syscall, libraries may create uk_threads that are
intended to act as kernel threads. Decouple pthread initializaiton from
uk_thread and limit it to clone().
Signed-off-by: Michalis Pappas <michalis@unikraft.io>
Approved-by: Andrei Tatar <andrei@unikraft.io>
Reviewed-by: Sergiu Moga <sergiu@unikraft.io>
Reviewed-by: Andrei Tatar <andrei@unikraft.io>
GitHub-Closes: #1627
pprocess_release(pprocess);
}
-UK_THREAD_INIT_PRIO(posix_thread_init, posix_thread_fini, UK_PRIO_EARLIEST);
+UK_THREAD_INIT_PRIO(0, posix_thread_fini, UK_PRIO_EARLIEST);
struct posix_process *pid2pprocess(pid_t pid)
{