ARM: SMP: send IPI in backtrace only for SMP
Bug in backtrace leads to NULL Pointer dereference with CONFIG_SMP_ON_UP while sending IPI, fix it. ----------------------------------------------------------------- [ 301.992943] Unable to handle kernel NULL pointer dereference at virtual address 00000000 [ 302.023626] pgd = c0004000 [ 302.033985] [00000000] *pgd=00000000 [ 302.048057] Internal error: Oops: 80000007 [#1] PREEMPT SMP ARM [ 302.070273] Modules linked in: [ 302.082206] CPU: 0 Not tainted (3.4.0+ #12) [ 302.099386] PC is at 0x0 [ 302.109251] LR is at smp_send_all_cpu_backtrace+0x88/0xe4 [ 302.129993] pc : [<00000000>] lr : [<c00144f0>] psr: 20000193 [ 302.130522] sp : c02edd80 ip : 00000000 fp : 7fffffff [ 302.173742] r10: 00000000 r9 : c02ee0c0 r8 : 19484bea [ 302.193789] r7 : 00002710 r6 : 00000000 r5 : 00000000 r4 : c031d034 [ 302.218816] r3 : c030ad58 r2 : 00010001 r1 : 00000007 r0 : c031d044 [ 302.243885] Flags: nzCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel [ 302.272171] Control: 10c5387d Table: 2f404059 DAC: 00000015 [ 302.293986] [ 302.294243] LR: 0xc0014470: [ 302.310233] 4470 e3c20d7f e30d4034 e3c0303f e34c4031 e3a00000 e284101c e5935014 eb05c24f [ 302.341559] 4490 e2503000 18bd80f8 e30567a4 e34c6021 e1a01004 e1a00005 e5962000 e1a06003 [ 302.372890] 44b0 e3027710 e592e000 e5a1e010 eb05b841 e1a01005 e30a05bc e34c0027 eb07ed21 [ 302.404222] 44d0 eb07ec87 e30a05e0 e34c0027 eb07ed1d e1a00004 e490c010 e3a01007 e12fff3c [ 302.435554] 44f0 ea000008 eb05bcab e594c010 e30605b0 e3400666 e31c000f 0a000009 eb05bca5 [ 302.466888] 4510 e1560007 0a000006 e5941010 e2863001 e30605b0 e2836001 e311000f e3400666 [ 302.498220] 4530 1affffef e3a00000 e59f1008 eb05b821 f57ff05f e8bd80f8 c031d050 e30537a8 [ 302.529555] 4550 e34c3021 e92d4ff0 e5938000 e3067750 e30495c8 e30f6d00 e24dd00c e241b001 [ 302.560973] [ 302.561235] SP: 0xc02edd00: [ 302.577222] dd00 392e3130 36353137 00205d36 00000000 c02edd7c c020f974 c02ca964 c02edd2c [ 302.608555] dd20 00000000 00000000 20000193 ffffffff c02edd6c c000eef8 c031d044 00000007 [ 302.639897] dd40 00010001 c030ad58 c031d034 00000000 00000000 00002710 19484bea c02ee0c0 [ 302.671221] dd60 00000000 7fffffff 00000000 c02edd80 c00144f0 00000000 20000193 ffffffff [ 302.702565] dd80 c030ad58 c05aca98 c0306764 c030dd00 c030dd00 c007c664 295f6000 00001dc6 [ 302.733898] dda0 00000017 c0306970 00000000 c0306970 c02e9a98 19484bea 00000046 00000000 [ 302.765220] ddc0 7fffffff c007cc58 c02ec000 c0307c80 00000000 00000000 19484bea c0033100 [ 302.796555] dde0 c05ac888 c05ac888 c0341c40 c0305f40 19484bea c0060f78 c05ac888 c05ac738 [ 302.827969] [ 302.828233] R0: 0xc031cfc4: [ 302.844218] cfc4 006c3776 00000000 c027eb38 00000000 410fc051 00000000 00000000 00000000 [ 302.875563] cfe4 00000000 00000000 00000000 00000000 00000000 00000000 00000000 c030cac0 [ 302.906895] d004 c0308d90 00000000 003.299225] ad98 00000004 ffffffff 00000000 00000001 00000000 00000000 ffffffff 00000001 [ 303.330564] adb8 00000000 00000000 c030adc0 c030adc0 00000000 00000001 c0280068 c028006c [ 303.361958] [ 303.362221] R4: 0xc031cfb4: [ 303.378221] cfb4 00000000 00000000 00000000 c001e658 006c3776 0000ee000) [ 303.936303] dd80: c030ad58 c05aca98 c0306764 c030dd00 c030dd00 c007c664 295f6000 00001dc6 [ 303.967588] dda0: 00000017 c0306970 00000000 c0306970 c02e9a98 19484bea 00000046 00000000 [ 303.998940] ddc0: 7fffffff c007cc58 c02ec000 c0307c80 00000000 00000000 19484bea c0033100 [ 304.030275] 04.500235] dfc0: c02e55ec c02ca964 00000000 00000000 c02ca448 00000000 00000000 c02e55ec [ 304.531597] dfe0: 10c5387d c0305ea0 c02e55bc c0308d04 20204059 20208040 00000000 00000000 [ 304.563391] [<c00144f0>] (smp_send_all_cpu_backtrace+0x88/0xe4) from [<c007c664>] (__rcu_pending+0x17c/0x5ac) [ 30406] [<c0010108>] (handle_IRQ+0x5c/0xc0) from [<c0008530>] (gic_handle_irq+0x48/0xe8) [ 305.033405] [<c0008530>] (gic_handle_irq+0x48/0xe8) from [<c000ee00>] (__irq_svc+0x40/0x70) [ 305.064749] Exception stack(0xc02edf48 to 0xc02edf90) [ 305.084483] df40: 00000000 00000000 a00000c02ee0c0 r8 : 80000007 [ 305.544476] r7 : c0307c80 r6 : c02edb7c r5 : c0305ef8 r4 : 000f4240 [ 305.569465] r3 : 00000000 r2 : c031d034 r1 : 00000006 r0 : c02edb7c [ 305.594485] Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel [ 305.622824] Control: 10c5387d Table: 2f408 00010000 c02ec000 c02ec2f0 0000000b c027bb60 c02edd38 00000000 [ 306.414224] dbdc 00000000 80000007 00000000 00000000 c001addc 80000007 00000000 c02edd38 [ 306.445623] [ 306.445886] R2: 0xc031cfb4: [ 306.461894] cfb4 00000000 00000000 00000000 c001e658 006c3776 00000000 c027eb38 00000000 [ bc c02ec008 00010000 c02ec000 c02ec2f0 0000000b c027bb60 c02edd38 00000000 [ 307.215227] dbdc 00000000 80000007 00000000 00000000 c001addc 80000007 00000000 c02edd38 [ 307.246620] [ 307.246883] R7: 0xc0307c00: [ 307.262891] 7c00 c01b95ac c0213788 c01b95b8 c0213794 c01b9664 c02137a0 c01b966c b80: c031f380 c02edd38 00000000 c020f7ac c02ee0c0 c02edbbc 7fffffff c02ec2f0 [ 308.150942] dba0: c02edd38 00000000 c0307c80 80000007 c031d018 c0013394 c027a19c c02ec008 [ 308.182258] dbc0: 00010000 c02ec000 c02ec2f0 0000000b c027bb60 c02edd38 00000000 00000000 [ 308.213580] dbe0: 80000007 000000004aa54 00000046 c02eff00 [ 308.934261] dec0: c02eff54 cfa00540 00000000 d0804010 410fc051 00000027 00000000 c0074a9c [ 308.965605] dee0: c02eff00 c02eff54 00000027 c0077680 c0306970 c02e9f44 00000027 c00743ec [ 308.996956] df00: 00000178 c0010108 c0305ec8 d080400c c02edf48 c0305ec8 d0804010 c00085364>] (__rcu_pending+0x17c/0x5ac) from [<c007cc58>] (rcu_check_callbacks+0x1c4/0x1e0) [ 309.664887] [<c007cc58>] (rcu_check_callbacks+0x1c4/0x1e0) from [<c0033100>] (update_process_times+0x38/0x68) [ 309.702911] [<c0033100>] (update_process_times+0x38/0x68) from [<c0060f78>] (tick_sched_timer+0x9c/0xk(0xc02edf48 to 0xc02edf90) Change-Id: Icfd3585361c88ada6550f22b316af19e1a2b7721 Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
This commit is contained in:
committed by
Stephen Boyd
parent
982f597ea0
commit
2a94e2ae76
@@ -541,7 +541,8 @@ void smp_send_all_cpu_backtrace(void)
|
||||
dump_stack();
|
||||
|
||||
pr_info("\nsending IPI to all other CPUs:\n");
|
||||
smp_cross_call(&backtrace_mask, IPI_CPU_BACKTRACE);
|
||||
if (!cpus_empty(backtrace_mask))
|
||||
smp_cross_call(&backtrace_mask, IPI_CPU_BACKTRACE);
|
||||
|
||||
/* Wait for up to 10 seconds for all other CPUs to do the backtrace */
|
||||
for (i = 0; i < 10 * 1000; i++) {
|
||||
|
||||
Reference in New Issue
Block a user