Skip to contentSkip to conversation

Patch "sched/core: Idle_task_exit() shouldn't use switch_mm_irqs_off()" has been added to the 4.11-stable tree

PATCH [email protected] 1 participant 1 message Jun 18, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

sched/core: Idle_task_exit() shouldn't use switch_mm_irqs_off()

to the 4.11-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
sched-core-idle_task_exit-shouldn-t-use-switch_mm_irqs_off.patch
and it can be found in the queue-4.11 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 252d2a4117bc181b287eeddf848863788da733ae Mon Sep 17 00:00:00 2001

From: Andy Lutomirski <[email protected]>
Date: Fri, 9 Jun 2017 11:49:15 -0700
Subject: sched/core: Idle_task_exit() shouldn't use switch_mm_irqs_off()

From: Andy Lutomirski <[email protected]>

commit 252d2a4117bc181b287eeddf848863788da733ae upstream.

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.

Cc Borislav Petkov <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Thomas Gleixner <[email protected]>
Fixes f98db6013c55 ("sched/core: Add switch_mm_irqs_off() and use it in the scheduler")
---
 kernel/sched/core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/core.c +1 -1
@@ -5533,7 +5533,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);

Patches currently in stable-queue which might be from [email protected] are

queue-4.11/sched-core-idle_task_exit-shouldn-t-use-switch_mm_irqs_off.patch