Skip to content

Commit

Permalink
fork: Fix task_struct alignment
Browse files Browse the repository at this point in the history
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 <[email protected]>
Tested-by: Fengguang Wu <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Fixes: e274795 ("locking/mutex: Fix mutex handoff")
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Feb 20, 2017
1 parent bc88c10 commit 95cb64c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/fork.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 95cb64c

Please sign in to comment.