diff options
| author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-12-09 01:14:38 -0500 |
|---|---|---|
| committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-12-09 01:14:38 -0500 |
| commit | bcd6acd51f3d4d1ada201e9bc5c40a31d6d80c71 (patch) | |
| tree | 2f6dffd2d3e4dd67355a224de7e7a960335a92fd /kernel/fork.c | |
| parent | 11c34c7deaeeebcee342cbc35e1bb2a6711b2431 (diff) | |
| parent | 3ff6a468b45b5dfeb0e903e56f4eb27d34b2437c (diff) | |
Merge commit 'origin/master' into next
Conflicts:
include/linux/kvm.h
Diffstat (limited to 'kernel/fork.c')
| -rw-r--r-- | kernel/fork.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index 166b8c49257c..1415dc4598ae 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
| @@ -64,6 +64,7 @@ | |||
| 64 | #include <linux/magic.h> | 64 | #include <linux/magic.h> |
| 65 | #include <linux/perf_event.h> | 65 | #include <linux/perf_event.h> |
| 66 | #include <linux/posix-timers.h> | 66 | #include <linux/posix-timers.h> |
| 67 | #include <linux/user-return-notifier.h> | ||
| 67 | 68 | ||
| 68 | #include <asm/pgtable.h> | 69 | #include <asm/pgtable.h> |
| 69 | #include <asm/pgalloc.h> | 70 | #include <asm/pgalloc.h> |
| @@ -249,6 +250,7 @@ static struct task_struct *dup_task_struct(struct task_struct *orig) | |||
| 249 | goto out; | 250 | goto out; |
| 250 | 251 | ||
| 251 | setup_thread_stack(tsk, orig); | 252 | setup_thread_stack(tsk, orig); |
| 253 | clear_user_return_notifier(tsk); | ||
| 252 | stackend = end_of_stack(tsk); | 254 | stackend = end_of_stack(tsk); |
| 253 | *stackend = STACK_END_MAGIC; /* for overflow detection */ | 255 | *stackend = STACK_END_MAGIC; /* for overflow detection */ |
| 254 | 256 | ||
| @@ -884,6 +886,9 @@ static int copy_signal(unsigned long clone_flags, struct task_struct *tsk) | |||
| 884 | sig->utime = sig->stime = sig->cutime = sig->cstime = cputime_zero; | 886 | sig->utime = sig->stime = sig->cutime = sig->cstime = cputime_zero; |
| 885 | sig->gtime = cputime_zero; | 887 | sig->gtime = cputime_zero; |
| 886 | sig->cgtime = cputime_zero; | 888 | sig->cgtime = cputime_zero; |
| 889 | #ifndef CONFIG_VIRT_CPU_ACCOUNTING | ||
| 890 | sig->prev_utime = sig->prev_stime = cputime_zero; | ||
| 891 | #endif | ||
| 887 | sig->nvcsw = sig->nivcsw = sig->cnvcsw = sig->cnivcsw = 0; | 892 | sig->nvcsw = sig->nivcsw = sig->cnvcsw = sig->cnivcsw = 0; |
| 888 | sig->min_flt = sig->maj_flt = sig->cmin_flt = sig->cmaj_flt = 0; | 893 | sig->min_flt = sig->maj_flt = sig->cmin_flt = sig->cmaj_flt = 0; |
| 889 | sig->inblock = sig->oublock = sig->cinblock = sig->coublock = 0; | 894 | sig->inblock = sig->oublock = sig->cinblock = sig->coublock = 0; |
| @@ -1066,8 +1071,10 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
| 1066 | p->gtime = cputime_zero; | 1071 | p->gtime = cputime_zero; |
| 1067 | p->utimescaled = cputime_zero; | 1072 | p->utimescaled = cputime_zero; |
| 1068 | p->stimescaled = cputime_zero; | 1073 | p->stimescaled = cputime_zero; |
| 1074 | #ifndef CONFIG_VIRT_CPU_ACCOUNTING | ||
| 1069 | p->prev_utime = cputime_zero; | 1075 | p->prev_utime = cputime_zero; |
| 1070 | p->prev_stime = cputime_zero; | 1076 | p->prev_stime = cputime_zero; |
| 1077 | #endif | ||
| 1071 | 1078 | ||
| 1072 | p->default_timer_slack_ns = current->timer_slack_ns; | 1079 | p->default_timer_slack_ns = current->timer_slack_ns; |
| 1073 | 1080 | ||
| @@ -1310,7 +1317,8 @@ bad_fork_free_pid: | |||
| 1310 | if (pid != &init_struct_pid) | 1317 | if (pid != &init_struct_pid) |
| 1311 | free_pid(pid); | 1318 | free_pid(pid); |
| 1312 | bad_fork_cleanup_io: | 1319 | bad_fork_cleanup_io: |
| 1313 | put_io_context(p->io_context); | 1320 | if (p->io_context) |
| 1321 | exit_io_context(p); | ||
| 1314 | bad_fork_cleanup_namespaces: | 1322 | bad_fork_cleanup_namespaces: |
| 1315 | exit_task_namespaces(p); | 1323 | exit_task_namespaces(p); |
| 1316 | bad_fork_cleanup_mm: | 1324 | bad_fork_cleanup_mm: |
