diff options
| author | Ingo Molnar <mingo@elte.hu> | 2009-03-08 11:48:51 -0400 | 
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2009-03-08 11:48:51 -0400 | 
| commit | dba58e39ced7af63f2748d12bbb2b4ac83c72391 (patch) | |
| tree | ee15a5e7667b51d0d0f7e8cb39064652f7c84c28 /kernel/fork.c | |
| parent | 9de36825b321fe9fe9cf73260554251af579f4ca (diff) | |
| parent | 78ff7fae04554b49d29226ed12536268c2500d1f (diff) | |
Merge branches 'tracing/doc', 'tracing/ftrace', 'tracing/printk' and 'tracing/textedit' into tracing/core
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 a66fbde20715..8de303bdd4e5 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
| @@ -61,6 +61,7 @@ | |||
| 61 | #include <linux/proc_fs.h> | 61 | #include <linux/proc_fs.h> | 
| 62 | #include <linux/blkdev.h> | 62 | #include <linux/blkdev.h> | 
| 63 | #include <trace/sched.h> | 63 | #include <trace/sched.h> | 
| 64 | #include <linux/magic.h> | ||
| 64 | 65 | ||
| 65 | #include <asm/pgtable.h> | 66 | #include <asm/pgtable.h> | 
| 66 | #include <asm/pgalloc.h> | 67 | #include <asm/pgalloc.h> | 
| @@ -212,6 +213,8 @@ static struct task_struct *dup_task_struct(struct task_struct *orig) | |||
| 212 | { | 213 | { | 
| 213 | struct task_struct *tsk; | 214 | struct task_struct *tsk; | 
| 214 | struct thread_info *ti; | 215 | struct thread_info *ti; | 
| 216 | unsigned long *stackend; | ||
| 217 | |||
| 215 | int err; | 218 | int err; | 
| 216 | 219 | ||
| 217 | prepare_to_copy(orig); | 220 | prepare_to_copy(orig); | 
| @@ -237,6 +240,8 @@ static struct task_struct *dup_task_struct(struct task_struct *orig) | |||
| 237 | goto out; | 240 | goto out; | 
| 238 | 241 | ||
| 239 | setup_thread_stack(tsk, orig); | 242 | setup_thread_stack(tsk, orig); | 
| 243 | stackend = end_of_stack(tsk); | ||
| 244 | *stackend = STACK_END_MAGIC; /* for overflow detection */ | ||
| 240 | 245 | ||
| 241 | #ifdef CONFIG_CC_STACKPROTECTOR | 246 | #ifdef CONFIG_CC_STACKPROTECTOR | 
| 242 | tsk->stack_canary = get_random_int(); | 247 | tsk->stack_canary = get_random_int(); | 
