aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2017-02-18 15:26:45 +0100
committerIngo Molnar <mingo@kernel.org>2017-02-20 11:22:37 +0100
commit95cb64c1fe61e70685a95f6260c8e9cd219fe08c (patch)
tree590f00e1a61d7865525a8a2a8e9a61aed4b01977 /kernel
parentlocking/spinlock/debug: Remove spinlock lockup detection code (diff)
downloadlinux-dev-95cb64c1fe61e70685a95f6260c8e9cd219fe08c.tar.xz
linux-dev-95cb64c1fe61e70685a95f6260c8e9cd219fe08c.zip
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: Fengguang Wu <fengguang.wu@intel.com> Tested-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Peter 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: e274795ea7b7 ("locking/mutex: Fix mutex handoff") Link: http://lkml.kernel.org/r/20170218142645.GH6500@twins.programming.kicks-ass.net Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/fork.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index a90510d0bbf8..ea33f8adc032 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -434,7 +434,7 @@ void __init fork_init(void)
#ifndef ARCH_MIN_TASKALIGN
#define ARCH_MIN_TASKALIGN 0
#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 */
task_struct_cachep = kmem_cache_create("task_struct",