Commit 95cb64c1 authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Ingo Molnar

fork: Fix task_struct alignment

Stupid bug that wrecked the alignment of task_struct and causes WARN()s
in the x86 FPU code on some platforms.
Reported-by: default avatarFengguang Wu <fengguang.wu@intel.com>
Tested-by: default avatarFengguang Wu <fengguang.wu@intel.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Fixes: e274795e ("locking/mutex: Fix mutex handoff")
Link: http://lkml.kernel.org/r/20170218142645.GH6500@twins.programming.kicks-ass.netSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent bc88c10d
...@@ -434,7 +434,7 @@ void __init fork_init(void) ...@@ -434,7 +434,7 @@ void __init fork_init(void)
#ifndef ARCH_MIN_TASKALIGN #ifndef ARCH_MIN_TASKALIGN
#define ARCH_MIN_TASKALIGN 0 #define ARCH_MIN_TASKALIGN 0
#endif #endif
int align = min_t(int, L1_CACHE_BYTES, ARCH_MIN_TASKALIGN); int align = max_t(int, L1_CACHE_BYTES, ARCH_MIN_TASKALIGN);
/* create a slab on which task_structs can be allocated */ /* create a slab on which task_structs can be allocated */
task_struct_cachep = kmem_cache_create("task_struct", task_struct_cachep = kmem_cache_create("task_struct",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment