From: Alexey Dobriyan For those who don't care about CONFIG_SECURITY. Signed-off-by: Alexey Dobriyan Cc: "Serge E. Hallyn" Cc: Casey Schaufler Cc: James Morris Cc: Stephen Smalley Signed-off-by: Andrew Morton --- include/linux/sched.h | 3 ++- kernel/fork.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff -puN include/linux/sched.h~ifdef-struct-task_structsecurity include/linux/sched.h --- a/include/linux/sched.h~ifdef-struct-task_structsecurity +++ a/include/linux/sched.h @@ -1013,8 +1013,9 @@ struct task_struct { int (*notifier)(void *priv); void *notifier_data; sigset_t *notifier_mask; - +#ifdef CONFIG_SECURITY void *security; +#endif struct audit_context *audit_context; seccomp_t seccomp; diff -puN kernel/fork.c~ifdef-struct-task_structsecurity kernel/fork.c --- a/kernel/fork.c~ifdef-struct-task_structsecurity +++ a/kernel/fork.c @@ -1066,7 +1066,9 @@ static struct task_struct *copy_process( do_posix_clock_monotonic_gettime(&p->start_time); p->real_start_time = p->start_time; monotonic_to_bootbased(&p->real_start_time); +#ifdef CONFIG_SECURITY p->security = NULL; +#endif p->io_context = NULL; p->io_wait = NULL; p->audit_context = NULL; _