Commit 5b160f5e authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Linus Torvalds
Browse files

[PATCH] copy_process: cosmetic ->ioprio tweak

// holds tasklist_lock + ->siglock
        * inherit ioprio
       p->ioprio = current->ioprio;

Why?  ->ioprio was already copied in dup_task_struct().  I guess this is
needed to ensure that the child can't escape
sys_ioprio_set(IOPRIO_WHO_{PGRP,USER}), yes?

In that case we don't need ->siglock held, and the comment should be
Signed-off-by: default avatarOleg Nesterov <>
Cc: Jens Axboe <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 1c573afe
......@@ -1150,7 +1150,6 @@ static struct task_struct *copy_process(unsigned long clone_flags,
/* Our parent execution domain becomes current domain
These must match for thread signalling to apply */
p->parent_exec_id = p->self_exec_id;
/* ok, now we should be set up.. */
......@@ -1173,6 +1172,9 @@ static struct task_struct *copy_process(unsigned long clone_flags,
/* Need tasklist lock for parent etc handling! */
/* for sys_ioprio_set(IOPRIO_WHO_PGRP) */
p->ioprio = current->ioprio;
* The task hasn't been attached yet, so its cpus_allowed mask will
* not be changed, nor will its assigned CPU.
......@@ -1232,11 +1234,6 @@ static struct task_struct *copy_process(unsigned long clone_flags,
* inherit ioprio
p->ioprio = current->ioprio;
if (likely(p->pid)) {
if (unlikely(p->ptrace & PT_PTRACED))
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