Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit c92e3648 authored by Abhimanyu Kapur's avatar Abhimanyu Kapur
Browse files

arm64: mm: initialize spinlock for init_mm.context



init_mm used at kernel/sched.c:idle_task_exit() has spin_lock
(init_mm.context.id_lock) that is not initialized when
spin_lock/unlock is called on armv8 cpus. The
mm_struct.context.id_lock is usually initialized except
for the instance of init_mm at linux/arch/arm64/mm/context.c

[ 8.124018] BUG: failure at /kernel/lib/spinlock_debug.c:68/spin_dump()!
[ 8.124018] Kernel panic - not syncing: BUG!
[ 8.124019] CPU: 2 PID: 0 Comm: swapper/2 Tainted:
[ 8.124019] Call trace:
[ 8.124020] [<ffffffc000086ffc>] dump_backtrace+0x0/0x140
[ 8.124021] [<ffffffc000087150>] show_stack+0x14/0x1c
[ 8.124022] [<ffffffc0004ee2dc>] dump_stack+0x20/0x28
[ 8.124023] [<ffffffc0004eaee4>] panic+0xf4/0x21c
[ 8.124024] [<ffffffc0004ee388>] spin_bug+0x0/0x34
[ 8.124024] [<ffffffc0004ee3b0>] spin_bug+0x28/0x34
[ 8.124025] [<ffffffc000298684>] do_raw_spin_lock+0x34/0x118
[ 8.124027] [<ffffffc0004f20a4>] _raw_spin_lock_irqsave+0x28/0x38
[ 8.124028] [<ffffffc000091bb0>] set_mm_context+0x24/0x70
[ 8.124029] [<ffffffc000091d84>] __new_context+0xe8/0x114
[ 8.124030] [<ffffffc0000c4800>] idle_task_exit+0x114/0x174
[ 8.124031] [<ffffffc0004e6594>] cpu_die+0x18/0x74
[ 8.124032] [<ffffffc000084684>] arch_cpu_idle_dead+0xc/0x14
[ 8.124033] [<ffffffc0000d42bc>] cpu_startup_entry+0x208/0x20c
[ 8.124034] [<ffffffc0004e8084>] secondary_start_kernel+0xec/0xf8

Change-Id: Iba66e9000bbc2823fcb7ec948fbe8da694763f94
Signed-off-by: default avatarAbhimanyu Kapur <abhimany@codeaurora.org>
parent 2b979b24
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment