time: Fixup comments to reflect usage of timespec64
[deliverable/linux.git] / kernel / fork.c
index 8c162d102740a1ab806a5fe37ddf70e045c29832..9b7d746d6d629c3d9d1c937a677271f027a5fe2b 100644 (file)
@@ -294,11 +294,18 @@ int __weak arch_dup_task_struct(struct task_struct *dst,
        return 0;
 }
 
+void set_task_stack_end_magic(struct task_struct *tsk)
+{
+       unsigned long *stackend;
+
+       stackend = end_of_stack(tsk);
+       *stackend = STACK_END_MAGIC;    /* for overflow detection */
+}
+
 static struct task_struct *dup_task_struct(struct task_struct *orig)
 {
        struct task_struct *tsk;
        struct thread_info *ti;
-       unsigned long *stackend;
        int node = tsk_fork_get_node(orig);
        int err;
 
@@ -328,8 +335,7 @@ static struct task_struct *dup_task_struct(struct task_struct *orig)
        setup_thread_stack(tsk, orig);
        clear_user_return_notifier(tsk);
        clear_tsk_need_resched(tsk);
-       stackend = end_of_stack(tsk);
-       *stackend = STACK_END_MAGIC;    /* for overflow detection */
+       set_task_stack_end_magic(tsk);
 
 #ifdef CONFIG_CC_STACKPROTECTOR
        tsk->stack_canary = get_random_int();
@@ -1067,6 +1073,7 @@ static int copy_signal(unsigned long clone_flags, struct task_struct *tsk)
        sig->curr_target = tsk;
        init_sigpending(&sig->shared_pending);
        INIT_LIST_HEAD(&sig->posix_timers);
+       seqlock_init(&sig->stats_lock);
 
        hrtimer_init(&sig->real_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
        sig->real_timer.function = it_real_fn;
This page took 0.026308 seconds and 5 git commands to generate.