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

Crash on device disconnection #25

Open
MT00x opened this issue Mar 22, 2021 · 1 comment
Open

Crash on device disconnection #25

MT00x opened this issue Mar 22, 2021 · 1 comment

Comments

@MT00x
Copy link

MT00x commented Mar 22, 2021

The driver works quiet well until the USB device is disconnected, this cause a kernel error and reboot is needed to make device works again.

Kernel version: 4.14.79

usb 1-2: USB disconnect, device number 3
Internal error: Oops - undefined instruction: 0 [#1] ARM
Modules linked in: mt7601u mt7601Uap(O) rt2800usb rt2800lib rt2x00usb rt2x00lib mac80211 cfg80211 rfkill [last unloaded: mt7601u]
CPU: 0 PID: 203 Comm: kworker/0:1 Tainted: G           O    4.14.79 #1
Hardware name: Atmel AT91SAM9
Workqueue: usb_hub_wq hub_event
task: cf8f3820 task.stack: cf942000
PC is at free_netdev+0xc8/0xd0
LR is at pcpu_chunk_slot+0x3c/0x58
pc : [<c044552c>]    lr : [<c0185af8>]    psr: 80000013
sp : cf943ce8  ip : cf943c70  fp : cf943d04
r10: cf258274  r9 : cf258a00  r8 : bf2686cc
r7 : cf22e800  r6 : cde2683c  r5 : cde26800  r4 : cde267e4
r3 : 00000002  r2 : 00000000  r1 : 00008000  r0 : 0000000c
Flags: Nzcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
Control: 0005317f  Table: 2f238000  DAC: 00000053
Process kworker/0:1 (pid: 203, stack limit = 0xcf942190)
Stack: (0xcf943ce8 to 0xcf944000)
3ce0:                   cde26800 d1002000 c072ab34 cf22e800 cf943d1c cf943d08
3d00: bf23c0e8 c0445474 00000000 d1002000 cf943d4c cf943d20 bf24a760 bf23c0d0
3d20: cf943d2c 00000000 c03780c0 cde26800 cf258220 cf258220 bf2686cc cf258200
3d40: cf943d8c cf943d50 c037a690 bf24a6bc ffffffed cf22e870 cf22e800 00000000
3d60: 00000034 cf258220 cf258254 bf2686cc 00000000 00000034 cf258a00 cf258274
3d80: cf943db4 cf943d90 c02f57a0 c037a628 cf258220 c091e0dc cf9e434c cf22e870
3da0: c0953b44 cf258a00 cf943dc4 cf943db8 c02f5858 c02f5650 cf943de4 cf943dc8
3dc0: c02f440c c02f5850 cf258220 cf258274 cf258228 cf22e870 cf943e24 cf943de8
3de0: c02f1250 c02f4330 c037eda4 c02f13d8 00000188 00000008 cf943e24 cf22e800
3e00: 00000000 00000001 cf170400 cf258200 cf258a00 00000100 cf943e4c cf943e28
3e20: c0378168 c02f109c 00000000 cf22e800 cf22e870 cf22e8a4 cf172200 cf258a00
3e40: cf943e84 cf943e50 c036f5bc c03780e4 cf943e84 cf943e60 c036d1f8 00000000
3e60: 00000002 00000002 cf1726fc cf170000 40000001 00000100 cf943f04 cf943e88
3e80: c0371044 c036f518 cf943ed2 00000000 00000009 cf17238c cf1700a4 cf172800
3ea0: cf170400 00000000 00000003 cf170000 cf172638 cf17238c cf172208 cf172630
3ec0: cf172820 cf17262c cf172200 cf172600 00030100 00000000 c0909f50 cf1726fc
3ee0: cf91e200 cffde300 00000000 c0909544 00000000 00000008 cf943f3c cf943f08
3f00: c0124be0 c03709ec c0909558 c090eac0 c0909544 cf91e200 c0909544 ffffe000
3f20: c0909558 c090eac0 cf91e218 00000008 cf943f74 cf943f40 c0124e48 c0124a14
3f40: cf825e8c cf91e200 c0124df0 cf04a780 cf9b3920 cf942000 cf825e8c cf91e200
3f60: c0124df0 cf04a798 cf943fac cf943f78 c012a678 c0124e00 00000000 00000000
3f80: cf943fac cf9b3920 c012a55c 00000000 00000000 00000000 00000000 00000000
3fa0: 00000000 cf943fb0 c01027a0 c012a56c 00000000 00000000 00000000 00000000
3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
3fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
Backtrace:
[<c0445464>] (free_netdev) from [<bf23c0e8>] (RtmpOSNetDevFree+0x28/0x2c [mt7601Uap])
 r7:cf22e800 r6:c072ab34 r5:d1002000 r4:cde26800
[<bf23c0c0>] (RtmpOSNetDevFree [mt7601Uap]) from [<bf24a760>] (rtusb_disconnect+0xb4/0xf0 [mt7601Uap])
 r5:d1002000 r4:00000000
[<bf24a6ac>] (rtusb_disconnect [mt7601Uap]) from [<c037a690>] (usb_unbind_interface+0x78/0x268)
 r7:cf258200 r6:bf2686cc r5:cf258220 r4:cf258220
[<c037a618>] (usb_unbind_interface) from [<c02f57a0>] (device_release_driver_internal+0x160/0x200)
 r10:cf258274 r9:cf258a00 r8:00000034 r7:00000000 r6:bf2686cc r5:cf258254
 r4:cf258220
[<c02f5640>] (device_release_driver_internal) from [<c02f5858>] (device_release_driver+0x18/0x1c)
 r9:cf258a00 r8:c0953b44 r7:cf22e870 r6:cf9e434c r5:c091e0dc r4:cf258220
[<c02f5840>] (device_release_driver) from [<c02f440c>] (bus_remove_device+0xec/0x120)
[<c02f4320>] (bus_remove_device) from [<c02f1250>] (device_del+0x1c4/0x33c)
 r7:cf22e870 r6:cf258228 r5:cf258274 r4:cf258220
[<c02f108c>] (device_del) from [<c0378168>] (usb_disable_device+0x94/0x1d8)
 r10:00000100 r9:cf258a00 r8:cf258200 r7:cf170400 r6:00000001 r5:00000000
 r4:cf22e800
[<c03780d4>] (usb_disable_device) from [<c036f5bc>] (usb_disconnect+0xb4/0x210)
 r9:cf258a00 r8:cf172200 r7:cf22e8a4 r6:cf22e870 r5:cf22e800 r4:00000000
[<c036f508>] (usb_disconnect) from [<c0371044>] (hub_event+0x668/0x1154)
 r10:00000100 r9:40000001 r8:cf170000 r7:cf1726fc r6:00000002 r5:00000002
 r4:00000000
[<c03709dc>] (hub_event) from [<c0124be0>] (process_one_work+0x1dc/0x3ec)
 r10:00000008 r9:00000000 r8:c0909544 r7:00000000 r6:cffde300 r5:cf91e200
 r4:cf1726fc
[<c0124a04>] (process_one_work) from [<c0124e48>] (worker_thread+0x58/0x5dc)
 r10:00000008 r9:cf91e218 r8:c090eac0 r7:c0909558 r6:ffffe000 r5:c0909544
 r4:cf91e200
[<c0124df0>] (worker_thread) from [<c012a678>] (kthread+0x11c/0x134)
 r10:cf04a798 r9:c0124df0 r8:cf91e200 r7:cf825e8c r6:cf942000 r5:cf9b3920
 r4:cf04a780
[<c012a55c>] (kthread) from [<c01027a0>] (ret_from_fork+0x14/0x34)
 r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c012a55c
 r4:cf9b3920
Code: e1d300b2 e0450000 ebf4f940 e89da8f0 (e7f001f2)
---[ end trace 6e284616c2a0c898 ]---
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = c0004000
[00000000] *pgd=00000000
Internal error: Oops: 17 [#2] ARM
Modules linked in: mt7601u mt7601Uap(O) rt2800usb rt2800lib rt2x00usb rt2x00lib mac80211 cfg80211 rfkill [last unloaded: mt7601u]
CPU: 0 PID: 7 Comm: ksoftirqd/0 Tainted: G      D    O    4.14.79 #1
Hardware name: Atmel AT91SAM9
task: cf828420 task.stack: cf83a000
PC is at in_dev_finish_destroy+0x44/0xac
LR is at in_dev_finish_destroy+0x34/0xac
pc : [<c04ae6f8>]    lr : [<c04ae6e8>]    psr: 80000093
sp : cf83be90  ip : cf83be90  fp : cf83bea4
r10: c0933d20  r9 : 00000100  r8 : ffffe000
r7 : c0148258  r6 : ffffe000  r5 : cde26800  r4 : cde2fa00
r3 : 80000093  r2 : 00000000  r1 : 80000013  r0 : 00000000
Flags: Nzcv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment none
Control: 0005317f  Table: 2f25c000  DAC: 00000053
Process ksoftirqd/0 (pid: 7, stack limit = 0xcf83a190)
Stack: (0xcf83be90 to 0xcf83c000)
be80:                                     cf1eed38 00000fff cf83beb4 cf83bea8
bea0: c04ae7f0 c04ae6c4 cf83bed4 cf83beb8 c0148258 c04ae7c8 c090ea9c 0000000a
bec0: 00000200 c0933d44 cf83beec cf83bed8 c01482cc c01481fc 00000009 0000000a
bee0: cf83bf3c cf83bef0 c0101564 c01482c4 cf83bf34 cf83bf00 c052b798 04208040
bf00: 0000aa55 0000000a c0933d20 40000009 ffffe000 cf80bf40 ffffe000 00000000
bf20: c0908268 00000001 c012de58 cf811858 cf83bf4c cf83bf40 c0112f84 c01014d0
bf40: cf83bf74 cf83bf50 c012df5c c0112f58 cf811840 cf80bf20 cf83a000 cf821df4
bf60: cf80bf40 c012de58 cf83bfac cf83bf78 c012a678 c012de68 00000000 00000000
bf80: cf83bfac cf80bf20 c012a55c 00000000 00000000 00000000 00000000 00000000
bfa0: 00000000 cf83bfb0 c01027a0 c012a56c 00000000 00000000 00000000 00000000
bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
bfe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
Backtrace:
[<c04ae6b4>] (in_dev_finish_destroy) from [<c04ae7f0>] (in_dev_rcu_put+0x38/0x3c)
 r5:00000fff r4:cf1eed38
[<c04ae7b8>] (in_dev_rcu_put) from [<c0148258>] (__rcu_process_callbacks+0x6c/0xc8)
[<c01481ec>] (__rcu_process_callbacks) from [<c01482cc>] (rcu_process_callbacks+0x18/0x28)
 r7:c0933d44 r6:00000200 r5:0000000a r4:c090ea9c
[<c01482b4>] (rcu_process_callbacks) from [<c0101564>] (__do_softirq+0xa4/0x264)
 r5:0000000a r4:00000009
[<c01014c0>] (__do_softirq) from [<c0112f84>] (run_ksoftirqd+0x3c/0x5c)
 r10:cf811858 r9:c012de58 r8:00000001 r7:c0908268 r6:00000000 r5:ffffe000
 r4:cf80bf40
[<c0112f48>] (run_ksoftirqd) from [<c012df5c>] (smpboot_thread_fn+0x104/0x184)
[<c012de58>] (smpboot_thread_fn) from [<c012a678>] (kthread+0x11c/0x134)
 r9:c012de58 r8:cf80bf40 r7:cf821df4 r6:cf83a000 r5:cf80bf20 r4:cf811840
[<c012a55c>] (kthread) from [<c01027a0>] (ret_from_fork+0x14/0x34)
 r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c012a55c
 r4:cf80bf20
Code: e10f1000 e3813080 e121f003 e5952248 (e5923000)
---[ end trace 6e284616c2a0c899 ]---
Kernel panic - not syncing: Fatal exception in interrupt
---[ end Kernel panic - not syncing: Fatal exception in interrupt

@MT00x
Copy link
Author

MT00x commented Mar 23, 2021

Update:
the problem is somehow related to dchpcd daemon.
Stopping dhcpcd solve the issue when the device is disconnected.
Also adding
denyinterfaces ra0
to /etc/dhcpc.conf works.

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