From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753162AbdBTKZu (ORCPT ); Mon, 20 Feb 2017 05:25:50 -0500 Received: from terminus.zytor.com ([65.50.211.136]:35602 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753110AbdBTKZo (ORCPT ); Mon, 20 Feb 2017 05:25:44 -0500 Date: Mon, 20 Feb 2017 02:25:09 -0800 From: tip-bot for Peter Zijlstra Message-ID: 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 Reply-To: torvalds@linux-foundation.org, peterz@infradead.org, linux-kernel@vger.kernel.org, mingo@kernel.org, hpa@zytor.com, fengguang.wu@intel.com, tglx@linutronix.de In-Reply-To: <20170218142645.GH6500@twins.programming.kicks-ass.net> References: <20170218142645.GH6500@twins.programming.kicks-ass.net> To: linux-tip-commits@vger.kernel.org Subject: [tip:locking/core] fork: Fix task_struct alignment Git-Commit-ID: 95cb64c1fe61e70685a95f6260c8e9cd219fe08c X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 95cb64c1fe61e70685a95f6260c8e9cd219fe08c Gitweb: http://git.kernel.org/tip/95cb64c1fe61e70685a95f6260c8e9cd219fe08c Author: Peter Zijlstra AuthorDate: Sat, 18 Feb 2017 15:26:45 +0100 Committer: Ingo Molnar 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 Tested-by: Fengguang Wu Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner 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 --- 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",