Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RaspberryPi] Kernel Fault when using "cat /dev/rfm12b.0.1" and hitting CTRL-C #2

Open
richbayliss opened this issue Jul 26, 2013 · 3 comments

Comments

@richbayliss
Copy link

Firstly, thanks for this amazing effort at getting the tricky RFM12B module working on the Pi. I tried in vain to get it working using SPIDEV and Python but alas it was too slow to cope with the tiny buffer on the RFM12.

I have compiled your module using the Yocto project system and I can load the module into the kernel. When I open the device using "cat /dev/rfm12b.0.1" I can see the nIRQ line go high but when hitting CTRL-C I get a kernel fault:

[ 94.090169] Unable to handle kernel NULL pointer dereference at virtual address 0000001c

I don't know if this is expected, but I was wondering if you could either explain it?

Thanks again.

@gkaindl
Copy link
Owner

gkaindl commented Aug 2, 2013

hmm, no, that is not expected, of course.

I can't seem to reproduce this problem with my setup, though (I tried with a script that waits a random amount of time before sending the SIGINT to cat) – Could you please send me the full stack dump from your logs, please?

Other than that, maybe it has to do with the build system? I haven't used Yocto yet...

@Frankenslag
Copy link

I got a similar thing to this also. But I didn't have any RFM12b hardware connected. When I actually built the hardware then the issue went away

@droloff
Copy link

droloff commented Mar 15, 2017

same problem here. Let me know if you need any more info's. I really would like to use this driver. The userland library is working fine, but i don't like the polling of the IRQ GPIO.
I am using a rpi3 with Kernel 4.4.38-v7+

after:

insmod ./rfm12b.ko
cat /dev/rfm12b.0.1
CTRL-C

i will get a kernel oops ...
[370249.160787] rfm12b: added RFM12(B) transceiver rfm12b.0.1
[370249.160930] rfm12b : driver loaded.
[370260.417152] rfm12b: transceiver <0x7f05b748> (RFM12(B)) settings now: group 211, band 1, bit rate 0x06 (49261 bps), jee id: 15,
jee autoack: 1.
[370278.919110] Unable to handle kernel NULL pointer dereference at virtual address 0000001c
[370278.919128] pgd = 80004000
[370278.919134] [0000001c] *pgd=00000000
[370278.919145] Internal error: Oops: 5 [#1] SMP ARM
[370278.919152] Modules linked in: rfm12b(O) bnep hci_uart btbcm bluetooth brcmfmac brcmutil cfg80211 rfkill snd_bcm2835 snd_pcm sn
d_timer snd spi_bcm2835 bcm2835_gpiomem bcm2835_wdt w1_gpio uio_pdrv_genirq uio w1_therm wire cn i2c_dev fuse ipv6
[370278.919212] CPU: 1 PID: 206 Comm: spi0 Tainted: G O 4.4.38-v7+ #938
[370278.919217] Hardware name: BCM2709
[370278.919223] task: b90ae780 ti: b85ca000 task.ti: b85ca000
[370278.919238] PC is at rfmXX_handle_interrupt+0x18/0x1fc [rfm12b]
[370278.919247] LR is at platform_irq_handled+0x80/0x84 [rfm12b]
[370278.919254] pc : [<7f0599b8>] lr : [<7f059c1c>] psr: 60000013
sp : b85cbe20 ip : b85cbe40 fp : b85cbe3c
[370278.919261] r10: b85ca000 r9 : b99fc810 r8 : 20000013
[370278.919267] r7 : aa96580c r6 : 00000000 r5 : 00000000 r4 : 7f05b748
[370278.919272] r3 : 808a5718 r2 : b9ac690c r1 : 00000019 r0 : 00000000
[370278.919280] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
[370278.919286] Control: 10c5383d Table: 2aac806a DAC: 00000055
[370278.919292] Process spi0 (pid: 206, stack limit = 0xb85ca210)
[370278.919298] Stack: (0xb85cbe20 to 0xb85cc000)
[370278.919308] be20: 8034f2bc 8034dc1c 808a5718 7f05b748 b85cbe54 b85cbe40 7f059c1c 7f0599ac
[370278.919318] be40: aa96587c aa965800 b85cbe7c b85cbe58 7f059cb4 7f059ba8 7f059c20 b99b2000
[370278.919327] be60: 60000013 b99b21ec aa96587c b99fc810 b85cbea4 b85cbe80 803ffcf4 7f059c2c
[370278.919337] be80: 00000000 aa96587c b99b2000 b3a9bdb0 b99b2240 805c0e5c b85cbee4 b85cbea8
[370278.919347] bea0: 80400100 803ffbbc 00000000 b3a9bc00 b3a9bdb0 00000001 b85ca000 aa965848
[370278.919355] bec0: aa96587c b99fc810 b99fc810 00000001 00000002 b99b2000 b85cbf24 b85cbee8
[370278.919364] bee0: 804005bc 803ffde4 b99b21c4 808f6b0c b85ca000 b99b21c4 b99b21c4 b99b21dc
[370278.919372] bf00: b99b21c4 808f6b0c b85ca000 808f6b0c b85ca038 00000000 b85cbf34 b85cbf28
[370278.919381] bf20: 80400890 80400224 b85cbf5c b85cbf38 800428dc 8040087c 00000000 b86971c0
[370278.919391] bf40: b99b21c4 80042878 00000000 00000000 b85cbfac b85cbf60 80042860 80042884
[370278.919400] bf60: 39712000 00000000 00000000 b99b21c4 00000000 00000000 b85cbf78 b85cbf78
[370278.919409] bf80: 00000000 00000000 b85cbf88 b85cbf88 b86971c0 80042774 00000000 00000000
[370278.919417] bfa0: 00000000 b85cbfb0 8000fbc8 80042780 00000000 00000000 00000000 00000000
[370278.919425] bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[370278.919433] bfe0: 00000000 00000000 00000000 00000000 00000013 00000000 3a7fa861 3a7fac61
[370278.919464] [<7f0599b8>] (rfmXX_handle_interrupt [rfm12b]) from [<7f059c1c>] (platform_irq_handled+0x80/0x84 [rfm12b])
[370278.919479] [<7f059c1c>] (platform_irq_handled [rfm12b]) from [<7f059cb4>] (rfm12_recv_spi_completion_handler+0x94/0x140 [rfm12b])
[370278.919495] [<7f059cb4>] (rfm12_recv_spi_completion_handler [rfm12b]) from [<803ffcf4>] (spi_finalize_current_message+0x144/0x228)
[370278.919506] [<803ffcf4>] (spi_finalize_current_message) from [<80400100>] (spi_transfer_one_message+0x328/0x440)
[370278.919515] [<80400100>] (spi_transfer_one_message) from [<804005bc>] (__spi_pump_messages+0x3a4/0x658)
[370278.919524] [<804005bc>] (__spi_pump_messages) from [<80400890>] (spi_pump_messages+0x20/0x24)
[370278.919536] [<80400890>] (spi_pump_messages) from [<800428dc>] (kthread_worker_fn+0x64/0x198)
[370278.919546] [<800428dc>] (kthread_worker_fn) from [<80042860>] (kthread+0xec/0x104)
[370278.919556] [<80042860>] (kthread) from [<8000fbc8>] (ret_from_fork+0x14/0x2c)
[370278.919566] Code: e24cb004 e24dd00c e52de004 e8bd4000 (e590301c)
[370278.919573] ---[ end trace c014630e859bd441 ]---

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants