X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=kernel%2Ffork.c;h=d154cc786489f3928bbaefe5d31e8da4f78b2481;hb=886c5952950ffed0e8ca3eb9efdc2728bfc144d3;hp=4cf868458f06bb2fed06df3ff9f5624ca4d92a20;hpb=c9cc8e771cb62e495765793e4b7d06016ae1b525;p=firefly-linux-kernel-4.4.55.git diff --git a/kernel/fork.c b/kernel/fork.c index 4cf868458f06..d154cc786489 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -858,7 +858,7 @@ static inline int copy_signal(unsigned long clone_flags, struct task_struct * ts init_sigpending(&sig->shared_pending); INIT_LIST_HEAD(&sig->posix_timers); - hrtimer_init(&sig->real_timer, CLOCK_MONOTONIC, HRTIMER_REL); + hrtimer_init(&sig->real_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); sig->it_real_incr.tv64 = 0; sig->real_timer.function = it_real_fn; sig->tsk = tsk; @@ -869,7 +869,7 @@ static inline int copy_signal(unsigned long clone_flags, struct task_struct * ts sig->it_prof_incr = cputime_zero; sig->leader = 0; /* session leadership doesn't inherit */ - sig->tty_old_pgrp = 0; + sig->tty_old_pgrp = NULL; sig->utime = sig->stime = sig->cutime = sig->cstime = cputime_zero; sig->nvcsw = sig->nivcsw = sig->cnvcsw = sig->cnivcsw = 0; @@ -1038,10 +1038,12 @@ static struct task_struct *copy_process(unsigned long clone_flags, p->utime = cputime_zero; p->stime = cputime_zero; p->sched_time = 0; +#ifdef CONFIG_TASK_XACCT p->rchar = 0; /* I/O counter: bytes read */ p->wchar = 0; /* I/O counter: bytes written */ p->syscr = 0; /* I/O counter: read syscalls */ p->syscw = 0; /* I/O counter: write syscalls */ +#endif task_io_accounting_init(p); acct_clear_integrals(p); @@ -1265,7 +1267,7 @@ static struct task_struct *copy_process(unsigned long clone_flags, return p; bad_fork_cleanup_namespaces: - put_and_finalize_nsproxy(p->nsproxy); + exit_task_namespaces(p); bad_fork_cleanup_keys: exit_keys(p); bad_fork_cleanup_mm: @@ -1313,7 +1315,7 @@ noinline struct pt_regs * __devinit __attribute__((weak)) idle_regs(struct pt_re return regs; } -struct task_struct * __devinit fork_idle(int cpu) +struct task_struct * __cpuinit fork_idle(int cpu) { struct task_struct *task; struct pt_regs regs; @@ -1711,7 +1713,7 @@ asmlinkage long sys_unshare(unsigned long unshare_flags) } if (new_nsproxy) - put_and_finalize_nsproxy(new_nsproxy); + put_nsproxy(new_nsproxy); bad_unshare_cleanup_ipc: if (new_ipc)