sched, task_struct: stack_canary is not needed without CC_STACKPROTECTOR
authorHiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Tue, 18 Aug 2009 06:06:02 +0000 (15:06 +0900)
committerIngo Molnar <mingo@elte.hu>
Tue, 18 Aug 2009 13:45:11 +0000 (15:45 +0200)
The field stack_canary is only used with CC_STACKPROTECTOR.
This patch reduces task_struct size without CC_STACKPROTECTOR.

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
LKML-Reference: <4A8A44CA.2020701@ct.jp.nec.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/linux/sched.h

index 195d72d..7bc2d92 100644 (file)
@@ -1237,8 +1237,10 @@ struct task_struct {
        pid_t pid;
        pid_t tgid;
 
+#ifdef CONFIG_CC_STACKPROTECTOR
        /* Canary value for the -fstack-protector gcc feature */
        unsigned long stack_canary;
+#endif
 
        /* 
         * pointers to (original) parent process, youngest child, younger sibling,