From: tip-bot for Peter Zijlstra <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: hpa@zytor.com, fengguang.wu@intel.com, tglx@linutronix.de,
torvalds@linux-foundation.org, peterz@infradead.org,
linux-kernel@vger.kernel.org, mingo@kernel.org
Subject: [tip:locking/core] fork: Fix task_struct alignment
Date: Mon, 20 Feb 2017 02:25:09 -0800 [thread overview]
Message-ID: <tip-95cb64c1fe61e70685a95f6260c8e9cd219fe08c@git.kernel.org> (raw)
In-Reply-To: <20170218142645.GH6500@twins.programming.kicks-ass.net>
Commit-ID: 95cb64c1fe61e70685a95f6260c8e9cd219fe08c
Gitweb: http://git.kernel.org/tip/95cb64c1fe61e70685a95f6260c8e9cd219fe08c
Author: Peter Zijlstra <peterz@infradead.org>
AuthorDate: Sat, 18 Feb 2017 15:26:45 +0100
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 20 Feb 2017 11:22:37 +0100
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>
---
kernel/fork.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/fork.c b/kernel/fork.c
index a90510d..ea33f8a 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",
prev parent reply other threads:[~2017-02-20 10:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-18 8:57 [locking/mutex] e274795ea7 WARNING: CPU: 0 PID: 1 at arch/x86/include/asm/fpu/internal.h:348 __switch_to Fengguang Wu
2017-02-18 10:28 ` Peter Zijlstra
2017-02-18 13:53 ` Fengguang Wu
2017-02-18 14:26 ` Peter Zijlstra
2017-02-19 2:53 ` Fengguang Wu
2017-02-20 10:25 ` tip-bot for Peter Zijlstra [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-95cb64c1fe61e70685a95f6260c8e9cd219fe08c@git.kernel.org \
--to=tipbot@zytor.com \
--cc=fengguang.wu@intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.