Hi all. Commit 378677eb8f44621ecc9ce659f7af61e5baa94d81 ("wifi: mac80211: Purge vif txq in ieee80211_do_stop()") seems to have made rsi_usb/rsi_91x cause a kernel panic when removing the USB while the interface is up. With the dmesg below and kdump, the issue is somewhere when ieee80211_txq_purge calls fq_tin_reset, which is going over my head. I've tried to follow the code path as well as I can but I am lost in this code. == USB connected == [ 67.332615] [ T11] usb 1-2: New USB device found, idVendor=1618, idProduct=9113, bcdDevice= 0.02 [ 67.332895] [ T11] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=6 [ 67.333156] [ T11] usb 1-2: Product: Wireless USB Network Module [ 67.333417] [ T11] usb 1-2: Manufacturer: Redpine Signals, Inc. [ 67.333673] [ T11] usb 1-2: SerialNumber: 000000000001 [ 67.338763] [ T11] rsi_91x: rsi_probe: Initialized os intf ops [ 67.345650] [ T11] rsi_91x: ================================================ [ 67.345920] [ T11] rsi_91x: ================ RSI Version Info ============== [ 67.346181] [ T11] rsi_91x: ================================================ [ 67.346444] [ T11] rsi_91x: FW Version : 1.6.2 [ 67.346707] [ T11] rsi_91x: Operating mode : 1 [Wi-Fi alone] [ 67.346708] [ T11] rsi_91x: Firmware file : rsi/rs9113_wlan_qspi.rps [ 67.346974] [ T11] rsi_91x: ================================================ [ 67.434534] [ T11] rsi_91x: ***** Firmware Loading successful ***** [ 67.452334] [ T788] rsi_91x: Max Stations Allowed = 32 [ 67.490729] [ T734] RSI-USB WLAN 1-2:1.0 wlp0s20u2: renamed from wlan0 == Interface brought up with `ip` == [ 78.459327] [ T827] rsi_91x: ===> Interface UP <=== [ 78.459625] [ T827] rsi_91x: rsi_disable_ps: Cannot accept disable PS in PS_NONE state == USB disconnected == [ 81.093884] [ T11] usb 1-2: USB disconnect, device number 4 [ 81.145395] [ T11] BUG: unable to handle page fault for address: 000000009dff2338 [ 81.145637] [ T11] #PF: supervisor read access in kernel mode [ 81.145868] [ T11] #PF: error_code(0x0000) - not-present page [ 81.146096] [ T11] PGD 0 P4D 0 [ 81.146323] [ T11] Oops: Oops: 0000 [#1] SMP NOPTI [ 81.146548] [ T11] CPU: 0 UID: 0 PID: 11 Comm: kworker/0:1 Kdump: loaded Not tainted 6.15.0 #1 PREEMPT(voluntary) c74d5f1746d8801a78fe4695a51ca9b00b89ab7e [ 81.146790] [ T11] Hardware name: Dell Inc. Latitude E7250/0TPHC4, BIOS A19 01/23/2018 [ 81.147026] [ T11] Workqueue: usb_hub_wq hub_event [ 81.147267] [ T11] RIP: 0010:fq_flow_reset.constprop.0+0x12/0x140 [mac80211] [ 81.147608] [ T11] Code: 00 00 00 00 0f 1f 40 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 0f 1f 44 00 00 41 57 41 56 41 55 41 54 55 48 89 f5 53 <48> 8b 5e 18 4c 8b 3e 48 85 db 74 6a 4c 8d 6e 18 49 89 fc 49 39 dd [ 81.148175] [ T11] RSP: 0018:ffffcb54c009b918 EFLAGS: 00010202 [ 81.148466] [ T11] RAX: ffff89629dff2328 RBX: ffff89629dff2328 RCX: ffff89628cb49210 [ 81.148757] [ T11] RDX: 000000009dff2328 RSI: 000000009dff2320 RDI: ffff89628cb489c0 [ 81.149048] [ T11] RBP: 000000009dff2320 R08: 0000000000000000 R09: 0000000000000000 [ 81.149340] [ T11] R10: ffff89628cb49210 R11: 0000000000000246 R12: ffff89629dff2338 [ 81.149630] [ T11] R13: ffff89628cb48900 R14: ffffcb54c009bad0 R15: ffffcb54c009b9b0 [ 81.149918] [ T11] FS: 0000000000000000(0000) GS:ffff8963fbe8e000(0000) knlGS:0000000000000000 [ 81.150211] [ T11] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 81.150502] [ T11] CR2: 000000009dff2338 CR3: 0000000098224003 CR4: 00000000003706f0 [ 81.150797] [ T11] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 81.151093] [ T11] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 81.151390] [ T11] Call Trace: [ 81.151688] [ T11] <TASK> [ 81.151984] [ T11] ieee80211_txq_purge+0x3f/0x130 [mac80211 43c4902366977cd272d3ef7b3fb48467d12f0d58] [ 81.152357] [ T11] ieee80211_do_stop+0x5ad/0x970 [mac80211 43c4902366977cd272d3ef7b3fb48467d12f0d58] [ 81.152727] [ T11] ? synchronize_rcu_expedited+0x1df/0x220 [ 81.153042] [ T11] ieee80211_stop+0x58/0x1b0 [mac80211 43c4902366977cd272d3ef7b3fb48467d12f0d58] [ 81.153418] [ T11] __dev_close_many+0xd5/0x1c0 [ 81.153736] [ T11] dev_close_many+0xec/0x1d0 [ 81.154052] [ T11] netif_close+0x68/0xa0 [ 81.154369] [ T11] dev_close+0x34/0x60 [ 81.154685] [ T11] cfg80211_shutdown_all_interfaces+0x46/0xf0 [cfg80211 1825d75722fcd8fde2c6ea3f10f47ac1aa42aa46] [ 81.155073] [ T11] ieee80211_remove_interfaces+0x4c/0x220 [mac80211 43c4902366977cd272d3ef7b3fb48467d12f0d58] [ 81.155505] [ T11] ieee80211_unregister_hw+0x4a/0x130 [mac80211 43c4902366977cd272d3ef7b3fb48467d12f0d58] [ 81.155923] [ T11] rsi_mac80211_detach+0x29/0x80 [rsi_91x 7941f49e8f9c981e468dee219553f955496db722] [ 81.156294] [ T11] rsi_disconnect+0x22/0x220 [rsi_usb 2859e71050df9b30e3728380acc6137b8ab08c1f] [ 81.156666] [ T11] usb_unbind_interface+0x90/0x280 [ 81.157043] [ T11] device_release_driver_internal+0x19e/0x200 [ 81.157412] [ T11] bus_remove_device+0xc2/0x130 [ 81.157782] [ T11] device_del+0x160/0x3d0 [ 81.158148] [ T11] ? kobject_put+0xa2/0x200 [ 81.158487] [ T11] usb_disable_device+0xf4/0x220 [ 81.158822] [ T11] usb_disconnect+0xe3/0x310 [ 81.159153] [ T11] hub_event+0x802/0x1940 [ 81.159484] [ T11] process_one_work+0x190/0x350 [ 81.159815] [ T11] worker_thread+0x2d7/0x410 [ 81.160137] [ T11] ? __pfx_worker_thread+0x10/0x10 [ 81.160459] [ T11] kthread+0xf9/0x240 [ 81.160778] [ T11] ? __pfx_kthread+0x10/0x10 [ 81.161093] [ T11] ret_from_fork+0x31/0x50 [ 81.161410] [ T11] ? __pfx_kthread+0x10/0x10 [ 81.161724] [ T11] ret_from_fork_asm+0x1a/0x30 [ 81.162031] [ T11] </TASK> [ 81.162325] [ T11] Modules linked in: rsi_usb rsi_91x iwlmvm uvcvideo x86_pkg_temp_thermal intel_powerclamp videobuf2_vmalloc cdc_mbim videobuf2_memops coretemp uvc videobuf2_v4l2 cdc_wdm kvm_intel mac80211 videodev cdc_ncm cdc_ether usbnet videobuf2_common kvm qcserial mii usb_wwan mc irqbypass polyval_clmulni dell_pc spi_nor polyval_generic joydev libarc4 ghash_clmulni_intel platform_profile snd_hda_codec_realtek ext4 snd_ctl_led snd_hda_codec_generic mousedev mtd sha512_ssse3 snd_hda_scodec_component iwlwifi sha1_ssse3 snd_hda_codec_hdmi aesni_intel snd_hda_intel iTCO_wdt dell_laptop processor_thermal_device_pci_legacy crypto_simd mei_pxp mei_wdt at24 intel_rapl_msr snd_intel_dspcfg spi_intel_platform crc16 intel_pmc_bxt mei_hdcp intel_soc_dts_iosf cryptd mbcache ppdev jbd2 snd_hda_codec rapl iTCO_vendor_support spi_intel processor_thermal_device snd_hwdep dell_wmi dell_smm_hwmon processor_thermal_wt_hint intel_cstate dell_smbios processor_thermal_rfim snd_hda_core cfg80211 processor_thermal_rapl dcdbas snd_pcm mei_me [ 81.162379] [ T11] e1000e intel_rapl_common psmouse snd_timer intel_uncore sparse_keymap i2c_i801 processor_thermal_wt_req pcspkr dell_wmi_descriptor wmi_bmof mei ptp snd i2c_smbus processor_thermal_power_floor lpc_ich soundcore pps_core processor_thermal_mbox parport_pc parport int3403_thermal dell_rbtn int3400_thermal int3402_thermal acpi_pad rfkill int340x_thermal_zone acpi_thermal_rel i2c_dev sg dm_mod crypto_user loop nfnetlink bpf_preload ip_tables x_tables crc32c_generic i915 btrfs sdhci_pci i2c_algo_bit drm_buddy ttm sdhci_uhs2 sdhci blake2b_generic cqhci xor intel_gtt raid6_pq serio_raw drm_display_helper mmc_core atkbd libps2 vivaldi_fmap sha256_ssse3 cec video i8042 serio wmi [ 81.166351] [ T11] CR2: 000000009dff2338 I am unsure where to go from here. The driver itself is orphaned and the chip is not very common. If anyone with knowledge of the mac80211 codebase has any input, it is welcomed. But as of now, this USB driver is unusable. I have kernel dumps, vmcore dumps, whatever you may need, any help is appreciated!