mmdrop() in finish_cpu() was introduced on RT due to the merge of
commit f7757368e0f0 ("sched/core: Fix illegal RCU from offline CPUs").
However, it will cause kernel panic on RT kernel, sinces it breaks
commit a9647f8b0741 ("sched: Move mmdrop to RCU on RT"), which uses
delayed mmdrop on RT.
Without this patch, the following fatal exception will show after running
"rtcwake -m mem -s 10" several times.
general protection fault: 0000 [#1] PREEMPT_RT SMP PTI
RIP: 0010:switch_mm_irqs_off+0x14c/0x930
Call Trace:
__schedule+0x2f6/0x960
? __schedule+0x2f6/0x960
? preempt_schedule+0x38/0x40
preempt_schedule_common+0x27/0xf0
preempt_schedule+0x38/0x40
___preempt_schedule+0x16/0x20
? migrate_enable+0x116/0x330
? migrate_enable+0x116/0x330
migrate_enable+0x12a/0x330
rt_spin_unlock+0x2f/0xa0
serial8250_console_write+0x14b/0x310
? vt_console_print+0x217/0x3e0
univ8250_console_write+0x21/0x30
printk_kthread_func+0x272/0x610
kthread+0x12f/0x150
? console_cpu_notify+0x30/0x30
? kthread_park+0x90/0x90
ret_from_fork+0x3a/0x50
Modules linked in:
Kernel panic - not syncing: Fatal exception
Signed-off-by: Yongxin Liu <[email protected]>
---
kernel/cpu.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 2b6aec3623c1..c7fa9498e348 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -576,7 +576,6 @@ static int finish_cpu(unsigned int cpu)
*/
if (mm != &init_mm)
idle->active_mm = &init_mm;
- mmdrop(mm);
return 0;
}
--
2.14.4
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#8832):
https://lists.yoctoproject.org/g/linux-yocto/message/8832
Mute This Topic: https://lists.yoctoproject.org/mt/75513323/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-