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

SPI read failures cause NULL pointer dereferences #89

Open
Avamander opened this issue Apr 6, 2024 · 0 comments
Open

SPI read failures cause NULL pointer dereferences #89

Avamander opened this issue Apr 6, 2024 · 0 comments

Comments

@Avamander
Copy link
Contributor

Avamander commented Apr 6, 2024

I'm running on latest version of the module and it seems that the module is not very robust when the communication bus gets interfered with. This makes it really difficult to recover from errors or to even handle user actions (the hardware was unplugged).

[_c_spi_read] reading spi failed(-110).
Unable to handle kernel NULL pointer dereference at virtual address 0000000000000010
Mem abort info:
  ESR = 0x0000000096000005
  EC = 0x25: DABT (current EL), IL = 32 bits
  SET = 0, FnV = 0
  EA = 0, S1PTW = 0
  FSC = 0x05: level 1 translation fault
Data abort info:
  ISV = 0, ISS = 0x00000005
  CM = 0, WnR = 0
user pgtable: 4k pages, 39-bit VAs, pgdp=0000000007399000
[0000000000000010] pgd=0000000000000000, p4d=0000000000000000, pud=0000000000000000
Internal error: Oops: 0000000096000005 [#1] PREEMPT SMP
Modules linked in: nrc(O) spi_ft232h(O) vc4 brcmfmac snd_soc_hdmi_codec drm_display_helper cec snd_soc_core brcmutil bcm2835_codec(C) snd_compress raspberrypi_hwmon bcm2835_v4l2(C) snd_pcm_dmaengine bcm2835_isp(C) bcm2835_mmal_vchiq(C) v4l2_mem2mem videobuf2_vmalloc videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 videobuf2_common i2c_bcm2835 snd_bcm2835(C) videodev snd_pcm spi_bcm2835 snd_timer snd mc vc_sm_cma(C) uio_pdrv_genirq uio mac80211 libarc4 cfg80211 rfkill beepy_kbd(O) sharp(O) drm_dma_helper drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops i2c_dev drm fuse drm_panel_orientation_quirks backlight ip_tables x_tables ipv6
CPU: 3 PID: 754 Comm: nrc-spi-rx Tainted: G         C O       6.1.21-v8+ #1642
Hardware name: Raspberry Pi Zero 2 W Rev 1.0 (DT)
pstate: 40000005 (nZcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : spi_rx_thread+0x94/0xa04 [nrc]
lr : spi_rx_thread+0x7c/0xa04 [nrc]
sp : ffffffc008cf3dc0
x29: ffffffc008cf3dc0 x28: ffffff8007a01870 x27: ffffff8002f7a800
x26: 0000000000000000 x25: ffffffebb127e968 x24: ffffffffffffff92
x23: ffffff8004f01b00 x22: ffffff8007a5a020 x21: ffffff8004f01b00
x20: ffffff8005bd4600 x19: ffffff8007a01800 x18: 0000000000000001
x17: 0000000000000000 x16: ffffffebde0af338 x15: ffffffffffffffff
x14: 0000000000000001 x13: 2e293031312d2864 x12: ffffffebdf3e73b0
x11: 0000000000000003 x10: 0000000000000001 x9 : ffffffebde0af354
x8 : 0000000000017fe8 x7 : c0000000ffffefff x6 : ffffffebdf3cf370
x5 : ffffff943ce75000 x4 : ffffff801bed06a0 x3 : 0000000000000000
x2 : 0000000000000a20 x1 : 0000000000000000 x0 : 0000000000000000
Call trace:
 spi_rx_thread+0x94/0xa04 [nrc]
 kthread+0xfc/0x110
 ret_from_fork+0x10/0x20
Code: f9403f63 52814402 79419261 d2800000 (f9400875)
---[ end trace 0000000000000000 ]---
Unable to handle kernel NULL pointer dereference at virtual address 0000000000000010
Mem abort info:
  ESR = 0x0000000096000005
  EC = 0x25: DABT (current EL), IL = 32 bits
  SET = 0, FnV = 0
  EA = 0, S1PTW = 0
  FSC = 0x05: level 1 translation fault
Data abort info:
  ISV = 0, ISS = 0x00000005
  CM = 0, WnR = 0
user pgtable: 4k pages, 39-bit VAs, pgdp=0000000003a22000
[0000000000000010] pgd=0000000000000000, p4d=0000000000000000, pud=0000000000000000
Internal error: Oops: 0000000096000005 [#2] PREEMPT SMP
Modules linked in: nrc(O) spi_ft232h(O) vc4 brcmfmac snd_soc_hdmi_codec drm_display_helper cec snd_soc_core brcmutil bcm2835_codec(C) snd_compress raspberrypi_hwmon bcm2835_v4l2(C) snd_pcm_dmaengine bcm2835_isp(C) bcm2835_mmal_vchiq(C) v4l2_mem2mem videobuf2_vmalloc videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 videobuf2_common i2c_bcm2835 snd_bcm2835(C) videodev snd_pcm spi_bcm2835 snd_timer snd mc vc_sm_cma(C) uio_pdrv_genirq uio mac80211 libarc4 cfg80211 rfkill beepy_kbd(O) sharp(O) drm_dma_helper drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops i2c_dev drm fuse drm_panel_orientation_quirks backlight ip_tables x_tables ipv6
CPU: 3 PID: 755 Comm: spi-poll Tainted: G      D  C O       6.1.21-v8+ #1642
Hardware name: Raspberry Pi Zero 2 W Rev 1.0 (DT)
pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : spi_update_status+0x54/0xc74 [nrc]
lr : spi_irq+0x24/0x50 [nrc]
sp : ffffffc008cfbd30
x29: ffffffc008cfbd30 x28: 0000000000000000 x27: 0000000000000000
x26: 0000000000000000 x25: 000000000000c350 x24: ffffff8007a01800
x23: ffffffebb127e780 x22: 00000000000001f8 x21: ffffffebb1287ea8
x20: ffffff8002c92600 x19: 0000000000000000 x18: 0000000000000000
x17: 0000000000000000 x16: ffffffebdeb69bb0 x15: 0000000000000000
x14: 0000000000000000 x13: 0000000000000003 x12: 00000000ffff8c6d
x11: 0000000000000040 x10: 00000000000000ec x9 : ffffffebb1275264
x8 : 00000000000000ec x7 : ffffffc008cfc000 x6 : 00000000000000ec
x5 : ffffffc008cfbdc5 x4 : ffffff8007100000 x3 : 0000000000000000
x2 : 0000000000000000 x1 : ffffff8007100000 x0 : ffffff8002c92600
Call trace:
 spi_update_status+0x54/0xc74 [nrc]
 spi_irq+0x24/0x50 [nrc]
 spi_poll_thread+0xf8/0x130 [nrc]
 kthread+0xfc/0x110
 ret_from_fork+0x10/0x20
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

1 participant