aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/fork.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/fork.c')
-rw-r--r--kernel/fork.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index a0dad84567c9..1c999f3e0b47 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -183,7 +183,9 @@ static struct task_struct *dup_task_struct(struct task_struct *orig)
183 /* One for us, one for whoever does the "release_task()" (usually parent) */ 183 /* One for us, one for whoever does the "release_task()" (usually parent) */
184 atomic_set(&tsk->usage,2); 184 atomic_set(&tsk->usage,2);
185 atomic_set(&tsk->fs_excl, 0); 185 atomic_set(&tsk->fs_excl, 0);
186#ifdef CONFIG_BLK_DEV_IO_TRACE
186 tsk->btrace_seq = 0; 187 tsk->btrace_seq = 0;
188#endif
187 tsk->splice_pipe = NULL; 189 tsk->splice_pipe = NULL;
188 return tsk; 190 return tsk;
189} 191}
@@ -1061,7 +1063,11 @@ static struct task_struct *copy_process(unsigned long clone_flags,
1061#endif 1063#endif
1062#ifdef CONFIG_TRACE_IRQFLAGS 1064#ifdef CONFIG_TRACE_IRQFLAGS
1063 p->irq_events = 0; 1065 p->irq_events = 0;
1066#ifdef __ARCH_WANT_INTERRUPTS_ON_CTXSW
1067 p->hardirqs_enabled = 1;
1068#else
1064 p->hardirqs_enabled = 0; 1069 p->hardirqs_enabled = 0;
1070#endif
1065 p->hardirq_enable_ip = 0; 1071 p->hardirq_enable_ip = 0;
1066 p->hardirq_enable_event = 0; 1072 p->hardirq_enable_event = 0;
1067 p->hardirq_disable_ip = _THIS_IP_; 1073 p->hardirq_disable_ip = _THIS_IP_;
@@ -1144,7 +1150,6 @@ static struct task_struct *copy_process(unsigned long clone_flags,
1144 1150
1145 /* Our parent execution domain becomes current domain 1151 /* Our parent execution domain becomes current domain
1146 These must match for thread signalling to apply */ 1152 These must match for thread signalling to apply */
1147
1148 p->parent_exec_id = p->self_exec_id; 1153 p->parent_exec_id = p->self_exec_id;
1149 1154
1150 /* ok, now we should be set up.. */ 1155 /* ok, now we should be set up.. */
@@ -1167,6 +1172,9 @@ static struct task_struct *copy_process(unsigned long clone_flags,
1167 /* Need tasklist lock for parent etc handling! */ 1172 /* Need tasklist lock for parent etc handling! */
1168 write_lock_irq(&tasklist_lock); 1173 write_lock_irq(&tasklist_lock);
1169 1174
1175 /* for sys_ioprio_set(IOPRIO_WHO_PGRP) */
1176 p->ioprio = current->ioprio;
1177
1170 /* 1178 /*
1171 * The task hasn't been attached yet, so its cpus_allowed mask will 1179 * The task hasn't been attached yet, so its cpus_allowed mask will
1172 * not be changed, nor will its assigned CPU. 1180 * not be changed, nor will its assigned CPU.
@@ -1226,11 +1234,6 @@ static struct task_struct *copy_process(unsigned long clone_flags,
1226 } 1234 }
1227 } 1235 }
1228 1236
1229 /*
1230 * inherit ioprio
1231 */
1232 p->ioprio = current->ioprio;
1233
1234 if (likely(p->pid)) { 1237 if (likely(p->pid)) {
1235 add_parent(p); 1238 add_parent(p);
1236 if (unlikely(p->ptrace & PT_PTRACED)) 1239 if (unlikely(p->ptrace & PT_PTRACED))