diff options
Diffstat (limited to 'kernel/fork.c')
-rw-r--r-- | kernel/fork.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index 294189fc7ac8..2f11bbe376b0 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -1035,6 +1035,11 @@ static int copy_signal(unsigned long clone_flags, struct task_struct *tsk) | |||
1035 | sig->nr_threads = 1; | 1035 | sig->nr_threads = 1; |
1036 | atomic_set(&sig->live, 1); | 1036 | atomic_set(&sig->live, 1); |
1037 | atomic_set(&sig->sigcnt, 1); | 1037 | atomic_set(&sig->sigcnt, 1); |
1038 | |||
1039 | /* list_add(thread_node, thread_head) without INIT_LIST_HEAD() */ | ||
1040 | sig->thread_head = (struct list_head)LIST_HEAD_INIT(tsk->thread_node); | ||
1041 | tsk->thread_node = (struct list_head)LIST_HEAD_INIT(sig->thread_head); | ||
1042 | |||
1038 | init_waitqueue_head(&sig->wait_chldexit); | 1043 | init_waitqueue_head(&sig->wait_chldexit); |
1039 | sig->curr_target = tsk; | 1044 | sig->curr_target = tsk; |
1040 | init_sigpending(&sig->shared_pending); | 1045 | init_sigpending(&sig->shared_pending); |
@@ -1474,6 +1479,8 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
1474 | atomic_inc(¤t->signal->sigcnt); | 1479 | atomic_inc(¤t->signal->sigcnt); |
1475 | list_add_tail_rcu(&p->thread_group, | 1480 | list_add_tail_rcu(&p->thread_group, |
1476 | &p->group_leader->thread_group); | 1481 | &p->group_leader->thread_group); |
1482 | list_add_tail_rcu(&p->thread_node, | ||
1483 | &p->signal->thread_head); | ||
1477 | } | 1484 | } |
1478 | attach_pid(p, PIDTYPE_PID); | 1485 | attach_pid(p, PIDTYPE_PID); |
1479 | nr_threads++; | 1486 | nr_threads++; |