mirror of
https://github.com/drasko/codezero.git
synced 2026-07-19 13:45:23 +02:00
Removed pagerid enforcement on thread operations
This commit is contained in:
@@ -494,22 +494,10 @@ int sys_thread_control(unsigned int flags, struct task_ids *ids)
|
|||||||
MAP_USR_RW, 1)) < 0)
|
MAP_USR_RW, 1)) < 0)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
if ((flags & THREAD_ACTION_MASK) != THREAD_CREATE) {
|
if ((flags & THREAD_ACTION_MASK) != THREAD_CREATE)
|
||||||
if (!(task = tcb_find(ids->tid)))
|
if (!(task = tcb_find(ids->tid)))
|
||||||
return -ESRCH;
|
return -ESRCH;
|
||||||
|
|
||||||
/*
|
|
||||||
* Tasks may only operate on their children. They may
|
|
||||||
* also destroy themselves or any children.
|
|
||||||
*/
|
|
||||||
if ((flags & THREAD_ACTION_MASK) == THREAD_DESTROY &&
|
|
||||||
!task_is_child(task) && task != current)
|
|
||||||
return -EPERM;
|
|
||||||
if ((flags & THREAD_ACTION_MASK) != THREAD_DESTROY
|
|
||||||
&& !task_is_child(task))
|
|
||||||
return -EPERM;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((err = cap_thread_check(task, flags, ids)) < 0)
|
if ((err = cap_thread_check(task, flags, ids)) < 0)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user