juliagoda / CH341SER

CH341SER driver with fixed bug

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Segmentation Fault when accessing the tty device after load

jeremielalanne opened this issue · comments

After adding my device's vendor and produt IDs to C file, I did make and make load, I can see in dmesg that it loads and that my device is attached to ttyUSB0, but when I try to access it with sudo stty -a -F /dev/ttyUSB0 it fails with segmentation fault or nothing, infinite loop, cannot even CTRL+C when it happens.
And then in my dmesg it shows:

[ 131.126796] usb 1-1.4: ch34x converter now attached to ttyUSB0
[ 179.118063] Unable to handle kernel access to user memory outside uaccess routines at virtual address 0000000000000040
[ 179.129103] Mem abort info:
[ 179.132058] ESR = 0x0000000096000044
[ 179.135880] EC = 0x25: DABT (current EL), IL = 32 bits
[ 179.141359] SET = 0, FnV = 0
[ 179.144528] EA = 0, S1PTW = 0
[ 179.147723] FSC = 0x04: level 0 translation fault
[ 179.152677] Data abort info:
[ 179.155602] ISV = 0, ISS = 0x00000044
[ 179.159497] CM = 0, WnR = 1
[ 179.162512] user pgtable: 4k pages, 48-bit VAs, pgdp=00000000440ff000
[ 179.169054] [0000000000000040] pgd=0000000000000000, p4d=0000000000000000
[ 179.175980] Internal error: Oops: 96000044 [#1] PREEMPT SMP
[ 179.181636] Modules linked in: ch34x(OE) usbserial cmac algif_hash algif_skcipher af_alg bnep hci_uart btqca btrtl btbcm btintel xt_conntrack nft_chain_nat xt_MASQUERADE nf_nat nf_conntrack_netlink nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nft_counter xt_addrtype nft_compat nf_tables nfnetlink br_netfilter bridge stp llc overlay binfmt_misc btsdio bluetooth ecdh_generic ecc brcmfmac bcm2835_isp(CE) bcm2835_codec(CE) bcm2835_v4l2(CE) brcmutil v4l2_mem2mem bcm2835_mmal_vchiq(CE) videobuf2_vmalloc videobuf2_dma_contig cfg80211 videobuf2_memops snd_bcm2835(CE) videobuf2_v4l2 raspberrypi_hwmon snd_pcm videobuf2_common snd_timer snd videodev bcm2835_gpiomem vc_sm_cma(CE) nvmem_rmem mc rpivid_mem uio_pdrv_genirq uio sch_fq_codel dm_multipath ramoops reed_solomon drm pstore_blk pstore_zone ip_tables x_tables autofs4 btrfs blake2b_generic zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor xor_neon raid6_pq libcrc32c raid1 raid0 multipath linear spidev
[ 179.181822] dwc2 roles i2c_bcm2835 udc_core crct10dif_ce spi_bcm2835 xhci_pci xhci_pci_renesas phy_generic aes_arm64
[ 179.281032] CPU: 2 PID: 2119 Comm: stty Tainted: G WC OE 5.15.0-1041-raspi #44-Ubuntu
[ 179.289947] Hardware name: Raspberry Pi 4 Model B Rev 1.1 (DT)
[ 179.295860] pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)