Commit 9727f6d3 authored by Jan Kiszka's avatar Jan Kiszka Committed by Philippe Gerum
Browse files

cobalt/posix: Avoid mapping remote threads in cobalt_sched_setscheduler_ex



Detect if the caller passed the PID of a remote thread that we do not
know yet. In that case, do not try to shadow anything, that will only
end up in a mess.
Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
parent 0d57f9bd
......@@ -752,7 +752,7 @@ int cobalt_sched_setscheduler_ex(pid_t pid,
thread = cobalt_current_thread();
if (thread == NULL) {
if (u_winoff == NULL)
if (u_winoff == NULL || pid != task_pid_vnr(current))
return -ESRCH;
thread = cobalt_thread_shadow(current, &hkey, u_winoff);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment