AAEONAEU-SW / meta-up-board

Yocto BSP meta layer for the UP Board
https://up-community.org
27 stars 20 forks source link

kernel oops on up-board when setting gpio as interrupt source #11

Closed floion closed 4 years ago

floion commented 4 years ago

Hi all, there seems to be a serious bug when running on the sumo kernel (version 4.14.154) Trying to set-up a gpio as an interrupt source and setting the edge param makes the kernel oops. Here are the steps:

echo 23 > /sys/class/gpio/export then echo in > /sys/class/gpio/gpio23/direction and finally echo falling > /sys/class/gpio/gpio23/edge

makes the kernel oops:

[ 58.380237] BUG: unable to handle kernel NULL pointer dereference at 0000000000000018 [ 58.380264] IP: irq_chip_set_type_parent+0x9/0x30 [ 58.380268] PGD 0 P4D 0 [ 58.380280] Oops: 0000 [#1] PREEMPT SMP PTI [ 58.380286] Modules linked in: ip6t_REJECT nf_reject_ipv6 ipt_REJECT nf_reject_ipv4 ip6table_filter ip6_tables ipt_MASQUERADE nf_nat_masquerade_ipv4 nf_conntrack_netlink nfnetlink xfrm_user br_netfilter xt_owner snd_soc_sst_byt_cht_nocodec spidev intel_rapl intel_powerclamp coretemp efivars mei_txe mei snd_intel_sst_acpi snd_intel_sst_core ti_adc081c snd_soc_sst_atom_hifi2_platform industrialio_triggered_buffer kfifo_buf snd_soc_sst_match pwm_lpss_platform pwm_lpss spi_pxa2xx_platform industrialio snd_soc_core snd_compress ac97_bus int3403_thermal int340x_thermal_zone dwc3_pci snd_hdmi_lpe_audio snd_pcm snd_timer snd uio iwlwifi cfg80211 nls_cp437 vfat fat i915 video [ 58.380423] CPU: 0 PID: 1738 Comm: bash Tainted: G U 4.14.154-yocto-standard #1 [ 58.380427] Hardware name: AAEON UP-CHT01/UP-CHT01, BIOS UPC1BM0S 06/04/2016 [ 58.380432] task: ffff8ea546478000 task.stack: ffffb20680798000 [ 58.380441] RIP: 0010:irq_chip_set_type_parent+0x9/0x30 [ 58.380445] RSP: 0018:ffffb2068079bcb0 EFLAGS: 00010002 [ 58.380453] RAX: ffffffffa5cde770 RBX: ffff8ea5593c4a00 RCX: 0000000000000000 [ 58.380456] RDX: ffffffffa7e72590 RSI: 0000000000000002 RDI: 0000000000000000 [ 58.380460] RBP: ffffb2068079bce0 R08: ffff8ea557c03500 R09: 0000000000000000 [ 58.380464] R10: 0000000000000040 R11: 0000000000000246 R12: 0000000000000000 [ 58.380467] R13: 0000000000000002 R14: 0000000000000000 R15: ffffffffa6ef8160 [ 58.380474] FS: 00007f91966df740(0000) GS:ffff8ea55ac00000(0000) knlGS:0000000000000000 [ 58.380478] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 58.380482] CR2: 0000000000000018 CR3: 000000003d8a6000 CR4: 00000000001006f0 [ 58.380485] Call Trace: [ 58.380497] ? irq_set_trigger+0x72/0x130 [ 58.380508] setup_irq+0x5f2/0x6f0 [ 58.380516] ? kmem_cache_alloc_trace+0x1bc/0x1d0 [ 58.380523] request_threaded_irq+0xfb/0x160 [ 58.380532] ? gpio_is_visible+0x70/0x70 [ 58.380538] request_any_context_irq+0x4d/0x90 [ 58.380545] gpio_sysfs_request_irq+0xbf/0x140 [ 58.380551] edge_store+0xc6/0xf0 [ 58.380562] dev_attr_store+0x1b/0x30 [ 58.380570] sysfs_kf_write+0x3c/0x50 [ 58.380575] kernfs_fop_write+0x119/0x190 [ 58.380585] __vfs_write+0x1b/0x40 [ 58.380590] vfs_write+0xa9/0x170 [ 58.380597] SyS_write+0x5c/0xe0 [ 58.380604] ? __close_fd+0x8f/0xb0 [ 58.380613] do_syscall_64+0x65/0x120 [ 58.380624] entry_SYSCALL_64_after_hwframe+0x3d/0xa2 [ 58.380631] RIP: 0033:0x7f9195dc5144 [ 58.380634] RSP: 002b:00007ffc1a768278 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 58.380640] RAX: ffffffffffffffda RBX: 0000000000000008 RCX: 00007f9195dc5144 [ 58.380644] RDX: 0000000000000008 RSI: 000055e04b2b3d50 RDI: 0000000000000001 [ 58.380647] RBP: 000055e04b2b3d50 R08: 000000000000000a R09: 0000000000000000 [ 58.380651] R10: 000000000000000a R11: 0000000000000246 R12: 00007f919608f760 [ 58.380654] R13: 0000000000000008 R14: 00007f919608a760 R15: 0000000000000008 [ 58.380663] Code: 8b 40 58 48 85 c0 74 0e 55 0f b6 d2 48 89 e5 e8 9e 48 b2 00 5d c3 b8 da ff ff ff c3 66 0f 1f 44 00 00 0f 1f 44 00 00 48 8b 7f 28 <48> 8b 47 18 48 8b 40 68 48 85 c0 74 0b 55 48 89 e5 e8 71 48 b2 [ 58.380768] RIP: irq_chip_set_type_parent+0x9/0x30 RSP: ffffb2068079bcb0 [ 58.380771] CR2: 0000000000000018 [ 58.380778] ---[ end trace bf3308144cf53cde ]--- [ 58.380841] note: bash[1738] exited with preempt_count 1

Is this issue known to anybody? Thank you

floion commented 4 years ago

@Dan-Emutex @dcleri @AAEONAEU-SW ^

floion commented 4 years ago

Hi, have you been able to reproduce this?