Commit 812b6f8
ENGR00235363 I2C: fix kernel crash due
Kernel crash log:
Unable to handle kernel NULL pointer dereference at
virtual address 00000001 pgd = d02ec000
[00000001] *pgd=00000000
Internal error: Oops: 1 [#1] PREEMPT SMP
Modules linked in:
CPU: 0 Not tainted (3.0.35-05332-ga7a1dec-dirty torvalds#38)
PC is at i2c_imx_probe+0xdc/0x434
LR is at i2c_imx_xfer+0x53c/0x75c
pc : [<c002645c>] lr : [<c03b1e98>] psr: 20000013
sp : d41c3dd8 ip : 00000001 fp : 00000001
r10: 00000001 r9 : ffff8fcc r8 : d41c3e48
r7 : c08f4dc0 r6 : 00000001 r5 : d41c3e48 r4 : d447f000
r3 : d417cbe r2 : 00000001 r1 : 000186a0 r0 : d447f000
Flags:nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
...
Process kworker/0:3 (pid: 1254, stack limit = 0xd41c22f0)
Stack: (0xd41c3dd8 to 0xd41c4000)
3dc0: 00000000
I2C driver call the function "static void __init i2c_imx_set_clk()"
in runtime, the function is linked to init.text section, and don't
be used after kernel bootup. Remove the "__init" statement to fix
the issue.
Signed-off-by: Fugang Duan <[email protected]>1 parent d4a15e9 commit 812b6f8
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
184 | | - | |
| 184 | + | |
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
| |||
0 commit comments