coolshou / rtl8814au

Drivers for the rtl8814au chipset wireless adapters (D-Link DWA-192 rev A1)
22 stars 7 forks source link

possible recursive locking detected. failed to load 8814au module #6

Closed em2xav closed 4 years ago

em2xav commented 4 years ago

Installed a new debug kernel: 5.3.11-300.fc31.x86_64+debug FEDORA 31

20.932523] ============================================ [ 18.934402] WARNING: possible recursive locking detected [ 18.936265] 5.3.11-300.fc31.x86_64+debug #1 Tainted: G O [ 18.938122] -------------------------------------------- [ 18.939986] systemd-udevd/608 is trying to acquire lock: [ 18.941863] 00000000e2e63ec5 (&(plock)->rlock){+...}, at: rtw_alloc_macid+0xb3/0x2b0 [8814au] [ 18.943827] but task is already holding lock: [ 18.947651] 00000000ee533eff (&(plock)->rlock){+...}, at: rtw_alloc_stainfo+0x40/0x223 [8814au] [ 18.949682] other info that might help us debug this: [ 18.953657] Possible unsafe locking scenario:

[ 18.957650] CPU0 [ 18.959650] ---- [ 18.961071] EXT4-fs (sda4): mounted filesystem with ordered data mode. Opts: (null) [ 18.961617] lock(&(plock)->rlock); [ 18.961618] lock(&(plock)->rlock); [ 18.961620] DEADLOCK [ 18.961620] May be due to missing lock nesting notation

[ 18.961622] 3 locks held by systemd-udevd/608: [ 18.961623] #0: 00000000b30a1f89 (&dev->mutex){....}, at: device_driver_lock+0x38/0x50 [ 18.961629] #1: 00000000bbedc29f (&dev->mutex){....}, at: device_driver_attach+0x1f/0x60 [ 18.961633] #2: 00000000ee533eff (&(plock)->rlock){+...}, at: rtw_alloc_stainfo+0x40/0x223 [8814au] [ 18.961686] stack backtrace: [ 18.988922] CPU: 6 PID: 608 Comm: systemd-udevd Tainted: G O 5.3.11-300.fc31.x86_64+debug #1 [ 18.988923] Hardware name: MSI MS-7759/Z77MA-G45 (MS-7759), BIOS V1.11 10/24/2013 [ 18.988924] Call Trace: [ 18.988930] dump_stack+0x8f/0xd0 [ 18.988935] lock_acquire.cold+0x134/0x1f8 [ 18.988938] lock_acquire+0xa2/0x1b0 [ 18.988978] ? rtw_alloc_macid+0xb3/0x2b0 [8814au] [ 18.988984] _raw_spin_lock_bh+0x39/0x80 [ 19.005119] ? rtw_alloc_macid+0xb3/0x2b0 [8814au] 19.005205] ? raw_spin_lock_init+0x2d/0x50 [ 19.015049] rtw_init_bcmc_stainfo+0x39/0x6f [8814au] [ 19.015093] rtw_init_drv_sw+0x131/0x162 [8814au] [ 19.015139] rtw_usb_if1_init+0xe5/0x14f [8814au] [ 19.021040] rtw_drv_init+0x265/0x334 [8814au] [ 19.021045] usb_probe_interface+0xe6/0x290 [ 19.021049] really_probe+0xf0/0x380 [ 19.021052] driver_probe_device+0x59/0xd0 [ 19.021055] device_driver_attach+0x53/0x60 [ 19.021058] driver_attach+0x8c/0x150 [ 19.021060] ? device_driver_attach+0x60/0x60 [ 19.021062] bus_for_each_dev+0x7b/0xc0 [ 19.021065] bus_add_driver+0x14d/0x1f0 [ 19.021069] driver_register+0x6c/0xb0 [ 19.021072] usb_register_driver+0x9f/0x140 [ 19.021074] ? 0xffffffffc0f85000 [ 19.021103] rtw_drv_entry+0x61/0x1000 [8814au] [ 19.021107] do_one_initcall+0x5d/0x2e4 [ 19.021111] ? do_init_module+0x23/0x230 [ 19.021113] ? rcu_read_lock_sched_held+0x6b/0x80 [ 19.021117] ? kmem_cache_alloc_trace+0x2c4/0x2f0 [ 19.021120] ? do_init_module+0x23/0x230 [ 19.021124] do_init_module+0x5c/0x230 [ 19.021127] load_module+0x27c2/0x2ad0 [ 19.021133] ? ima_post_read_file+0xfd/0x110 [ 19.021140] ? do_sys_finit_module+0xaa/0x110 [ 19.021143] do_sys_finit_module+0xaa/0x110 [ 19.021149] do_syscall_64+0x5c/0xb0 [ 19.021151] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 19.021153] RIP: 0033:0x7f4289ad715d [ 19.021157] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d fb 5c 0c 00 f7 d8 64 89 01 48 [ 19.021158] RSP: 002b:00007fff64e702d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 [ 19.021160] RAX: ffffffffffffffda RBX: 00005581580fd340 RCX: 00007f4289ad715d [ 19.021161] RDX: 0000000000000000 RSI: 00007f42896fe84d RDI: 0000000000000012 [ 19.021162] RBP: 0000000000020000 R08: 0000000000000000 R09: 0000000000000007 [ 19.021163] R10: 0000000000000012 R11: 0000000000000246 R12: 00007f42896fe84d [ 19.021164] R13: 0000000000000000 R14: 000055815811a9c0 R15: 00005581580fd340 [ 19.021266] ------------[ cut here ]------------

here is the entire dmesg output: log2.txt

here is the compile warning output: log1.txt

coolshou commented 4 years ago

try this fix for kernel >= 5.3

em2xav commented 4 years ago

works great. thanks.