This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Unable to handle kernel NULL pointer dereference at virtual address 00000028 on linux 2.6.37 kernel



Hi everyone, my wifi module can run successfully on linux 2.6.18, but when I load the module

insmod rt5370sta.ko

The following occurs:

root@192:/opt/ipnc/modules# insmod rt5370sta.ko
[ 144.578640] Unable to handle kernel NULL pointer dereference at virtual address 00000028
[ 144.589534] pgd = c2a54000
[ 144.592545] [00000028] *pgd=81861031, *pte=00000000, *ppte=00000000
[ 144.612289] Internal error: Oops: 17 [#1] PREEMPT
[ 144.617006] last sysfs file:
[ 144.619978] Modules linked in: rt5370sta(+) mtnet7601Usta mt7601Usta(P) mtutil7601Usta ppp_deflate ppp_generic netconsole slhc tun loop usbmon davinci cppi_dma musb_hdrc iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi libcrc32c sha1_generic crc32c crc_ccitt
[ 144.643409] CPU: 0 Tainted: P (2.6.37_IPNC_DM365_4.0.0 #6)
[ 144.650221] pc : [<c017aac0>] lr : [<c0179a14>] psr: 20000013
[ 144.650241] sp : c18abc40 ip : c18abc58 fp : c18abc54
[ 144.661722] r10: 00000000 r9 : c2b1b200 r8 : bf21cb24
[ 144.666962] r7 : bf21cc30 r6 : c2b1b200 r5 : c2b0a400 r4 : 0000000c
[ 144.673502] r3 : 00000001 r2 : 00000000 r1 : bf21cb24 r0 : 00000028
[ 144.680044] Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
[ 144.687192] Control: 0005317f Table: 82a54000 DAC: 00000015
[ 144.692950] Process insmod (pid: 758, stack limit = 0xc18aa270)
[ 144.698882] Stack: (0xc18abc40 to 0xc18ac000)
[ 144.703268] bc40: c18abc60 0000000c c18abc6c c18abc58 c0179a14 c017aac0 c18abc8e ffffff9c
[ 144.711477] bc60: c18abc7c c18abc70 c01c51ec c0179a04 c18abc94 c18abc80 c0210034 c01c51e0
[ 144.719686] bc80: 00000037 c2b1b220 c18abd4c c18abc98 bf1efb6c c0210024 5d373635 c0170020
[ 144.727894] bca0: c18ee5d0 c18ee570 c18ee5d0 c18abd18 c18abce4 c18abcc0 c00ec698 c00ec2a8
[ 144.736102] bcc0: c18abd04 c2b1b220 c2b0a400 c2b1b200 bf21cc30 bf21cb24 bf21cdc8 00000000
[ 144.744312] bce0: c18abcfc c18abcf0 c033e5c4 c0040168 c18abd24 c18abd10 c01c4f88 c033e5bc
[ 144.752522] bd00: c037cc7f c036bea9 bf214e4c c2b16e60 c18abd2c c021a354 c18abd44 c18abd28
[ 144.760731] bd20: c01c51c8 c2b1b220 c2b0a400 c2b1b200 bf21cc30 bf21cb24 bf21cdc8 00000000
[ 144.768940] bd40: c18abd74 c18abd50 c021ae18 bf1efb5c c01c89e0 c2b1b220 c2b1b220 bf21cc30
[ 144.777148] bd60: bf21cc30 c03dd874 c18abd94 c18abd78 c01c8b3c c021ad30 c2b1b220 c2b1b254
[ 144.785356] bd80: bf21cc30 c18abdb8 c18abdb4 c18abd98 c01c8c88 c01c8a94 00000000 00000000
[ 144.793565] bda0: c01c8c1c bf21cc30 c18abddc c18abdb8 c01c82b4 c01c8c2c c284abb8 c2b5d3f0
[ 144.801774] bdc0: bf21cc00 bf21cc30 bf21cc30 c293a5a0 c18abdec c18abde0 c01c8970 c01c826c
[ 144.809983] bde0: c18abe1c c18abdf0 c01c7b28 c01c8960 bf214e4c bf21cc30 bf21cc00 bf21cdbc
[ 144.818192] be00: bf21cc30 bf214e53 bf221000 00000000 c18abe44 c18abe20 c01c8fb8 c01c7a84
[ 144.826401] be20: c2a3dd30 bf21cc00 bf21cdbc bf21cc30 bf214e53 bf221000 c18abe64 c18abe48
[ 144.834609] be40: c021ab58 c01c8efc 00000000 c2a3dd30 00000000 bf21cdbc c18abe74 c18abe68
[ 144.842817] be60: bf221028 c021aafc c18abeac c18abe78 c002a45c bf221010 c2a3dd30 00000000
[ 144.851025] be80: bf21cdbc 00000010 00000000 c2a3dd30 00000000 bf21cdbc 00000010 bf21ce04
[ 144.859233] bea0: c18abfa4 c18abeb0 c006df60 c002a3a0 bf21cdc8 00000000 c18abedc c18abf68
[ 144.867442] bec0: 0009eec0 00012008 00000fd0 c3cc52cc c18aa000 bf21cea4 bf21711c c0344edc
[ 144.875649] bee0: c3c23000 000d4973 c3cc4f0c c3cc4e22 c3ceefc4 c280c000 00000000 00000000
[ 144.883854] bf00: 00000000 00000000 00000018 00000019 00000011 0000000e 0000000b 00000000
[ 144.892059] bf20: 6e72656b 00006c65 00000000 00000000 00000000 00000000 00000000 00000000
[ 144.900264] bf40: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 144.908470] bf60: 00000000 00000000 00000000 00000000 00000000 c03aa0c0 c1800300 4004d890
[ 144.916678] bf80: 00100000 402a8008 00000080 c002b1a4 c18aa000 00000000 00000000 c18abfa8
[ 144.924887] bfa0: c002b020 c006ccd8 4004d890 00100000 402a8008 000d4973 00012008 00081000
[ 144.933094] bfc0: 4004d890 00100000 402a8008 00000080 00012008 00000000 00000003 00000000
[ 144.941301] bfe0: be84af11 be84acac 00008cec 40242ad4 60000010 402a8008 00000000 00000000
[ 144.949483] Backtrace:
[ 144.951946] Function entered at [<c017aab0>] from [<c0179a14>]
[ 144.957785] r4:0000000c
[ 144.960329] Function entered at [<c01799f4>] from [<c01c51ec>]
[ 144.966167] r4:ffffff9c
[ 144.968710] Function entered at [<c01c51d0>] from [<c0210034>]
[ 144.974551] Function entered at [<c0210014>] from [<bf1efb6c>]
[ 144.980391] r4:c2b1b220
[ 144.982934] Function entered at [<bf1efb4c>] from [<c021ae18>]
[ 144.988776] Function entered at [<c021ad20>] from [<c01c8b3c>]
[ 144.994614] r8:c03dd874 r7:bf21cc30 r6:bf21cc30 r5:c2b1b220 r4:c2b1b220
[ 145.001369] Function entered at [<c01c8a84>] from [<c01c8c88>]
[ 145.007207] r7:c18abdb8 r6:bf21cc30 r5:c2b1b254 r4:c2b1b220
[ 145.012910] Function entered at [<c01c8c1c>] from [<c01c82b4>]
[ 145.018749] r6:bf21cc30 r5:c01c8c1c r4:00000000
[ 145.023396] Function entered at [<c01c825c>] from [<c01c8970>]
[ 145.029235] r7:c293a5a0 r6:bf21cc30 r5:bf21cc30 r4:bf21cc00
[ 145.034938] Function entered at [<c01c8950>] from [<c01c7b28>]
[ 145.040778] Function entered at [<c01c7a74>] from [<c01c8fb8>]
[ 145.046617] Function entered at [<c01c8eec>] from [<c021ab58>]
[ 145.052456] r8:bf221000 r7:bf214e53 r6:bf21cc30 r5:bf21cdbc r4:bf21cc00
[ 145.059210] Function entered at [<c021aaec>] from [<bf221028>]
[ 145.065049] r7:bf21cdbc r6:00000000 r5:c2a3dd30 r4:00000000
[ 145.070750] Function entered at [<bf221000>] from [<c002a45c>]
[ 145.076591] Function entered at [<c002a390>] from [<c006df60>]
[ 145.082433] Function entered at [<c006ccc8>] from [<c002b020>]
[ 145.088289] Code: e1a0c00d e92dd810 e24cb004 e24dd004 (e5903000)
[ 145.127330] ---[ end trace 364ddc6a8339e19e ]---
Segmentation fault

What is more: If I don't plug the wifi module, I can load the module successfully,.If I plug the wifi module, the above problem occurs.

The problem is the same module can work well on 2.6.18 kernel, so that indicates the module code has no problem. I doubt the 2.6.37 kernel has some problems.

Can anyone help me?

  • Minglei,

    Can you try to use the latest driver for rt5370sta? See whether you can get a 2.6.37 kernel driver. There will be lot of changes from 2.6.18 to 2.6.37 w.r.t kernel APIs. Your driver needs to be ported to accommodate those changes.