diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-03-01 02:55:20 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-03-01 02:55:20 -0500 |
commit | 35858adbfca13678af99fb31618ef4428d6dedb0 (patch) | |
tree | 3336feaa61324486945816cb52c347733e7c0821 /kernel/fork.c | |
parent | 197d4db752e67160d79fed09968c2140376a80a3 (diff) | |
parent | 4b70858ba8d4537daf782defebe5f2ff80ccef2b (diff) |
Merge branch 'next' into for-linus
Diffstat (limited to 'kernel/fork.c')
-rw-r--r-- | kernel/fork.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index 1415dc4598ae..5b2959b3ffc2 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -939,9 +939,9 @@ SYSCALL_DEFINE1(set_tid_address, int __user *, tidptr) | |||
939 | 939 | ||
940 | static void rt_mutex_init_task(struct task_struct *p) | 940 | static void rt_mutex_init_task(struct task_struct *p) |
941 | { | 941 | { |
942 | spin_lock_init(&p->pi_lock); | 942 | raw_spin_lock_init(&p->pi_lock); |
943 | #ifdef CONFIG_RT_MUTEXES | 943 | #ifdef CONFIG_RT_MUTEXES |
944 | plist_head_init(&p->pi_waiters, &p->pi_lock); | 944 | plist_head_init_raw(&p->pi_waiters, &p->pi_lock); |
945 | p->pi_blocked_on = NULL; | 945 | p->pi_blocked_on = NULL; |
946 | #endif | 946 | #endif |
947 | } | 947 | } |
@@ -1127,6 +1127,10 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
1127 | #ifdef CONFIG_DEBUG_MUTEXES | 1127 | #ifdef CONFIG_DEBUG_MUTEXES |
1128 | p->blocked_on = NULL; /* not blocked yet */ | 1128 | p->blocked_on = NULL; /* not blocked yet */ |
1129 | #endif | 1129 | #endif |
1130 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR | ||
1131 | p->memcg_batch.do_batch = 0; | ||
1132 | p->memcg_batch.memcg = NULL; | ||
1133 | #endif | ||
1130 | 1134 | ||
1131 | p->bts = NULL; | 1135 | p->bts = NULL; |
1132 | 1136 | ||
@@ -1206,9 +1210,10 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
1206 | p->sas_ss_sp = p->sas_ss_size = 0; | 1210 | p->sas_ss_sp = p->sas_ss_size = 0; |
1207 | 1211 | ||
1208 | /* | 1212 | /* |
1209 | * Syscall tracing should be turned off in the child regardless | 1213 | * Syscall tracing and stepping should be turned off in the |
1210 | * of CLONE_PTRACE. | 1214 | * child regardless of CLONE_PTRACE. |
1211 | */ | 1215 | */ |
1216 | user_disable_single_step(p); | ||
1212 | clear_tsk_thread_flag(p, TIF_SYSCALL_TRACE); | 1217 | clear_tsk_thread_flag(p, TIF_SYSCALL_TRACE); |
1213 | #ifdef TIF_SYSCALL_EMU | 1218 | #ifdef TIF_SYSCALL_EMU |
1214 | clear_tsk_thread_flag(p, TIF_SYSCALL_EMU); | 1219 | clear_tsk_thread_flag(p, TIF_SYSCALL_EMU); |
@@ -1286,7 +1291,6 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
1286 | } | 1291 | } |
1287 | 1292 | ||
1288 | if (likely(p->pid)) { | 1293 | if (likely(p->pid)) { |
1289 | list_add_tail(&p->sibling, &p->real_parent->children); | ||
1290 | tracehook_finish_clone(p, clone_flags, trace); | 1294 | tracehook_finish_clone(p, clone_flags, trace); |
1291 | 1295 | ||
1292 | if (thread_group_leader(p)) { | 1296 | if (thread_group_leader(p)) { |
@@ -1298,6 +1302,7 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
1298 | p->signal->tty = tty_kref_get(current->signal->tty); | 1302 | p->signal->tty = tty_kref_get(current->signal->tty); |
1299 | attach_pid(p, PIDTYPE_PGID, task_pgrp(current)); | 1303 | attach_pid(p, PIDTYPE_PGID, task_pgrp(current)); |
1300 | attach_pid(p, PIDTYPE_SID, task_session(current)); | 1304 | attach_pid(p, PIDTYPE_SID, task_session(current)); |
1305 | list_add_tail(&p->sibling, &p->real_parent->children); | ||
1301 | list_add_tail_rcu(&p->tasks, &init_task.tasks); | 1306 | list_add_tail_rcu(&p->tasks, &init_task.tasks); |
1302 | __get_cpu_var(process_counts)++; | 1307 | __get_cpu_var(process_counts)++; |
1303 | } | 1308 | } |