Commit c530ac0
Luwei Zhou
ENGR00270037 mxc: mlb: Fix MLB crash when testing abnormally
If quit the test program via CTRL+c during the test and leaving
the MITB still running, kernel crash sometimes happen when launching
the test program for a second time. This patch fix this issue. The
main modification is:
* Initialize the wait queue head dynamically not statically
* Enable/Disalbe IRQ when necessary
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = 80004000
[00000000] *pgd=00000000
Internal error: Oops: 80000007 [#1] SMP ARM
Modules linked in: mxc_mlb150
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.10.17-16879-g5d48ab5 #227
task: 80c2d908 ti: 80c22000 task.ti: 80c22000
PC is at 0x0
LR is at __wake_up_common+0x54/0x94
pc : [<00000000>] lr : [<8004b9fc>] psr: 90000193
sp : 80c23e18 ip : dc86ff1c fp : 80c23e44
r10: 00000000 r9 : 00000001 r8 : 00000000
r7 : 00000000 r6 : 7f002fe0 r5 : 7f0017fc r4 : dcaff0f4
r3 : 00000000 r2 : 00000000 r1 : 00000001 r0 : dc86ff1c
Flags: NzcV IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel
Control: 10c53c7d Table: 6c90004a DAC: 00000015
Process swapper/0 (pid: 0, stack limit = 0x80c22238)
Stack: (0x80c23e18 to 0x80c24000)
3e00: 00000000 00000001
3e20: dc1d14c0 7f002fdc 20000193 00000001 00000001 00000000 00000000 80c7018e
3e40: 80c23e6c 8004bbf4 00000000 8004bbf4 00000004 0091a840 7f002f80 7f002e1c
3e60: 00000004 fffffff9 00000001 7f001054 ffffae63 00000009 0000005a 00000000
3e80: ffffffff 00000010 00000095 00000000 00000000 00000095 dc011180 7f001168
3ea0: dc482e40 80073c08 00000015 80c2a770 80c1e7e0 dc011180 00000095 00000000
3ec0: f4000100 00000000 00000000 80c22000 80c2a4d8 80073d70 00000000 dc011180
3ee0: 00000095 80076ae8 00000095 800733d0 80c1ee3c 8000e848 f400010c 80c2a8b8
3f00: 80c23f20 80008570 8005a15c 804299d0 60000013 ffffffff 80c23f54 8000dbc0
3f20: 80c23f68 0000005a 3437dc5e 00000015 34373d83 00000015 81aef080 80c30050
3f40: 00000000 00000000 80c22000 80c2a4d8 00000017 80c23f68 8005a15c 804299d0
3f60: 60000013 ffffffff 3437dc5e 00000015 80cc41a4 806152ac 81aef080 80cc41a4
3f80: 00000000 80c30050 00000000 80429b10 00000001 80c7017a 80c2a524 806152ac
3fa0: 80c22000 80c7017a 80c22000 8000eb7c 00067162 800599f0 000000d9 80c12ef0
3fc0: 00000000 80bd6a9c ffffffff ffffffff 80bd6548 00000000 00000000 80c12ef0
3fe0: 10c53c7d 80c2a4a0 80c12eec 80c2e6ec 1000406a 10008074 00000000 00000000
[<8004b9fc>] (__wake_up_common+0x54/0x94) from [<8004bbf4>] (__wake_up+0x3c/0x50)
[<8004bbf4>] (__wake_up+0x3c/0x50) from [<7f001054>] (mlb_tx_isr+0xa0/0xf4 [mxc_mlb150])
[<7f001054>] (mlb_tx_isr+0xa0/0xf4 [mxc_mlb150]) from [<7f001168>] (mlb_ahb_isr+0xc0/0x134 [mxc_mlb150])
[<7f001168>] (mlb_ahb_isr+0xc0/0x134 [mxc_mlb150]) from [<80073c08>] (handle_irq_event_percpu+0x54/0x17c)
[<80073c08>] (handle_irq_event_percpu+0x54/0x17c) from [<80073d70>] (handle_irq_event+0x40/0x60)
[<80073d70>] (handle_irq_event+0x40/0x60) from [<80076ae8>] (handle_fasteoi_irq+0x80/0x158)
[<80076ae8>] (handle_fasteoi_irq+0x80/0x158) from [<800733d0>] (generic_handle_irq+0x2c/0x3c)
[<800733d0>] (generic_handle_irq+0x2c/0x3c) from [<8000e848>] (handle_IRQ+0x40/0x90)
[<8000e848>] (handle_IRQ+0x40/0x90) from [<80008570>] (gic_handle_irq+0x2c/0x5c)
[<80008570>] (gic_handle_irq+0x2c/0x5c) from [<8000dbc0>] (__irq_svc+0x40/0x50
Signed-off-by: Luwei Zhou <[email protected]>
(cherry picked from commit dd7f230)1 parent 25f5bf3 commit c530ac0
1 file changed
+22
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
441 | 441 | | |
442 | 442 | | |
443 | 443 | | |
444 | | - | |
445 | | - | |
446 | 444 | | |
447 | 445 | | |
448 | 446 | | |
| |||
474 | 472 | | |
475 | 473 | | |
476 | 474 | | |
477 | | - | |
478 | | - | |
479 | 475 | | |
480 | 476 | | |
481 | 477 | | |
| |||
507 | 503 | | |
508 | 504 | | |
509 | 505 | | |
510 | | - | |
511 | | - | |
512 | 506 | | |
513 | 507 | | |
514 | 508 | | |
| |||
540 | 534 | | |
541 | 535 | | |
542 | 536 | | |
543 | | - | |
544 | | - | |
545 | 537 | | |
546 | 538 | | |
547 | 539 | | |
| |||
1555 | 1547 | | |
1556 | 1548 | | |
1557 | 1549 | | |
| 1550 | + | |
| 1551 | + | |
| 1552 | + | |
| 1553 | + | |
| 1554 | + | |
| 1555 | + | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
1558 | 1566 | | |
1559 | 1567 | | |
1560 | 1568 | | |
| |||
1967 | 1975 | | |
1968 | 1976 | | |
1969 | 1977 | | |
| 1978 | + | |
| 1979 | + | |
| 1980 | + | |
1970 | 1981 | | |
1971 | 1982 | | |
| 1983 | + | |
1972 | 1984 | | |
1973 | 1985 | | |
1974 | 1986 | | |
| |||
1981 | 1993 | | |
1982 | 1994 | | |
1983 | 1995 | | |
| 1996 | + | |
1984 | 1997 | | |
1985 | 1998 | | |
1986 | 1999 | | |
| |||
2633 | 2646 | | |
2634 | 2647 | | |
2635 | 2648 | | |
| 2649 | + | |
2636 | 2650 | | |
2637 | 2651 | | |
2638 | 2652 | | |
| |||
0 commit comments