diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-09-27 18:13:53 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-09-27 18:13:53 -0400 |
commit | aebb1153ac54ddbbd3d3f0481a193f4bf0ead53b (patch) | |
tree | 57425aa83c8bed5b41af7e3408024fe1f2fdded9 /kernel/fork.c | |
parent | 022e7a12b6aa11a11de4d708fe8606c9a6734b37 (diff) | |
parent | a77c64c1a641950626181b4857abb701d8f38ccc (diff) |
Merge branch 'master' into upstream
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 f9b014e3e70..a0dad84567c 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -45,6 +45,7 @@ #include <linux/cn_proc.h> #include <linux/delayacct.h> #include <linux/taskstats_kern.h> +#include <linux/random.h> #include <asm/pgtable.h> #include <asm/pgalloc.h> @@ -175,6 +176,10 @@ static struct task_struct *dup_task_struct(struct task_struct *orig) tsk->thread_info = ti; setup_thread_stack(tsk, orig); +#ifdef CONFIG_CC_STACKPROTECTOR + tsk->stack_canary = get_random_int(); +#endif + /* One for us, one for whoever does the "release_task()" (usually parent) */ atomic_set(&tsk->usage,2); atomic_set(&tsk->fs_excl, 0); |