Skip to content

Commit 1fca251

Browse files
heicarstLinus Torvalds
authored andcommitted
[PATCH] s390: fix preempt_count of idle thread with cpu hotplug
Set preempt_count of idle_thread to zero before switching off cpu. Otherwise the preempt_count will be wrong if the cpu is switched on again since the thread will be reused. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent 6d751c4 commit 1fca251

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎arch/s390/kernel/process.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,10 @@ void default_idle(void)
128128
__ctl_set_bit(8, 15);
129129

130130
#ifdef CONFIG_HOTPLUG_CPU
131-
if (cpu_is_offline(cpu))
131+
if (cpu_is_offline(cpu)) {
132+
preempt_enable_no_resched();
132133
cpu_die();
134+
}
133135
#endif
134136

135137
local_mcck_disable();

0 commit comments

Comments
 (0)