From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751919AbdFKKBk (ORCPT ); Sun, 11 Jun 2017 06:01:40 -0400 Received: from terminus.zytor.com ([65.50.211.136]:45325 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751835AbdFKKBi (ORCPT ); Sun, 11 Jun 2017 06:01:38 -0400 Date: Sun, 11 Jun 2017 02:57:22 -0700 From: tip-bot for Andy Lutomirski Message-ID: Cc: mingo@kernel.org, bp@suse.de, luto@kernel.org, tglx@linutronix.de, peterz@infradead.org, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, hpa@zytor.com Reply-To: linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, hpa@zytor.com, mingo@kernel.org, bp@suse.de, tglx@linutronix.de, luto@kernel.org, peterz@infradead.org In-Reply-To: References: To: linux-tip-commits@vger.kernel.org Subject: [tip:sched/urgent] sched/core: Idle_task_exit() shouldn't use switch_mm_irqs_off() Git-Commit-ID: 252d2a4117bc181b287eeddf848863788da733ae 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: 252d2a4117bc181b287eeddf848863788da733ae Gitweb: http://git.kernel.org/tip/252d2a4117bc181b287eeddf848863788da733ae Author: Andy Lutomirski AuthorDate: Fri, 9 Jun 2017 11:49:15 -0700 Committer: Ingo Molnar CommitDate: Sun, 11 Jun 2017 10:58:17 +0200 sched/core: Idle_task_exit() shouldn't use switch_mm_irqs_off() idle_task_exit() can be called with IRQs on x86 on and therefore should use switch_mm(), not switch_mm_irqs_off(). This doesn't seem to cause any problems right now, but it will confuse my upcoming TLB flush changes. Nonetheless, I think it should be backported because it's trivial. There won't be any meaningful performance impact because idle_task_exit() is only used when offlining a CPU. Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: stable@vger.kernel.org Fixes: f98db6013c55 ("sched/core: Add switch_mm_irqs_off() and use it in the scheduler") Link: http://lkml.kernel.org/r/ca3d1a9fa93a0b49f5a8ff729eda3640fb6abdf9.1497034141.git.luto@kernel.org Signed-off-by: Ingo Molnar --- kernel/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 803c3bc..326d4f8 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -5605,7 +5605,7 @@ void idle_task_exit(void) BUG_ON(cpu_online(smp_processor_id())); if (mm != &init_mm) { - switch_mm_irqs_off(mm, &init_mm, current); + switch_mm(mm, &init_mm, current); finish_arch_post_lock_switch(); } mmdrop(mm);