diff options
author | H. Peter Anvin <hpa@zytor.com> | 2009-02-24 16:11:51 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-02-24 16:11:51 -0800 |
commit | 638bee71c83a2837b48062fdc5b222163cf53d79 (patch) | |
tree | 9c1699c07a5aa547d769138317279b8ee1ba89e8 /kernel/fork.c | |
parent | 2aaa822984b97efd894d10d1e1382206ef0291a7 (diff) | |
parent | a852cbfaaf8122827602027b1614971cfd832304 (diff) | |
download | op-kernel-dev-638bee71c83a2837b48062fdc5b222163cf53d79.zip op-kernel-dev-638bee71c83a2837b48062fdc5b222163cf53d79.tar.gz |
Merge branch 'x86/core' into x86/mce2
Diffstat (limited to 'kernel/fork.c')
-rw-r--r-- | kernel/fork.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index a66fbde..8de303bd 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -61,6 +61,7 @@ #include <linux/proc_fs.h> #include <linux/blkdev.h> #include <trace/sched.h> +#include <linux/magic.h> #include <asm/pgtable.h> #include <asm/pgalloc.h> @@ -212,6 +213,8 @@ static struct task_struct *dup_task_struct(struct task_struct *orig) { struct task_struct *tsk; struct thread_info *ti; + unsigned long *stackend; + int err; prepare_to_copy(orig); @@ -237,6 +240,8 @@ static struct task_struct *dup_task_struct(struct task_struct *orig) goto out; setup_thread_stack(tsk, orig); + stackend = end_of_stack(tsk); + *stackend = STACK_END_MAGIC; /* for overflow detection */ #ifdef CONFIG_CC_STACKPROTECTOR tsk->stack_canary = get_random_int(); |