mirror_ubuntu-kernels/drivers/net/wireless/realtek/rtw88
Sascha Hauer 290564367a wifi: rtw88: usb: kill and free rx urbs on probe failure
After rtw_usb_alloc_rx_bufs() has been called rx urbs have been
allocated and must be freed in the error path. After rtw_usb_init_rx()
has been called they are submitted, so they also must be killed.

Add these forgotten steps to the probe error path.

Besides the lost memory this also fixes a problem when the driver
fails to download the firmware in rtw_chip_info_setup(). In this
case it can happen that the completion of the rx urbs handler runs
at a time when we already freed our data structures resulting in
a kernel crash.

Fixes: a82dfd33d1 ("wifi: rtw88: Add common USB chip support")
Cc: stable@vger.kernel.org
Reported-by: Ilgaz Öcal <ilgaz@ilgaz.gen.tr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230823075021.588596-1-s.hauer@pengutronix.de
2023-08-25 13:02:27 +03:00
..
bf.c wifi: rtw88: Move register access from rtw_bf_assoc() outside the RCU 2023-01-16 18:27:43 +02:00
bf.h rtw88: don't check CRC of VHT-SIG-B in 802.11ac signal 2021-12-20 20:49:02 +02:00
coex.c wifi: rtw88: use RTW_FLAG_POWERON flag to prevent to power on/off twice 2023-02-17 11:33:13 +02:00
coex.h wifi: rtw88: access chip_info by const pointer 2022-08-09 08:48:59 +03:00
debug.c wifi: rtw88: fix incorrect error codes in rtw_debugfs_set_* 2023-05-05 10:38:08 +03:00
debug.h wifi: rtw88: sdio: Add HCI implementation for SDIO based chipsets 2023-04-12 15:51:08 +03:00
efuse.c wifi: rtw88: access chip_info by const pointer 2022-08-09 08:48:59 +03:00
efuse.h
fw.c wifi: rtw88: simplify vif iterators 2023-07-25 17:40:43 +03:00
fw.h wifi: rtw88: fix not entering PS mode after AP stops 2023-06-21 12:41:46 +03:00
hci.h wifi: rtw88: Drop rf_lock 2022-12-08 16:48:40 +02:00
Kconfig wifi: rtw88: Add support for the SDIO based RTL8723DS chipset 2023-05-25 19:09:39 +03:00
mac80211.c wifi: rtw88: fix not entering PS mode after AP stops 2023-06-21 12:41:46 +03:00
mac.c wifi: rtw88: add missing unwind goto for __rtw_download_firmware() 2023-06-13 11:36:59 +03:00
mac.h wifi: rtw88: sdio: Add HCI implementation for SDIO based chipsets 2023-04-12 15:51:08 +03:00
main.c wifi: rtw88: simplify vif iterators 2023-07-25 17:40:43 +03:00
main.h wifi: rtw88: remove unused and set but unused leftovers 2023-07-25 17:40:43 +03:00
Makefile wifi: rtw88: Add support for the SDIO based RTL8723DS chipset 2023-05-25 19:09:39 +03:00
pci.c Fix nomenclature for USB and PCI wireless devices 2023-08-25 12:56:49 +03:00
pci.h rtw88: Disable PCIe ASPM while doing NAPI poll on 8821CE 2021-12-20 20:48:10 +02:00
phy.c wifi: rtw88: iterate over vif/sta list non-atomically 2022-12-08 16:48:41 +02:00
phy.h wifi: rtw88: access chip_info by const pointer 2022-08-09 08:48:59 +03:00
ps.c wifi: rtw88: simplify vif iterators 2023-07-25 17:40:43 +03:00
ps.h wifi: rtw88: correct PS calculation for SUPPORTS_DYNAMIC_PS 2023-06-01 16:16:40 +03:00
reg.h wifi: rtw88: Stop high queue during scan 2023-06-21 12:41:45 +03:00
regd.c wifi: rtw88: add mutex when set regulatory and get Tx power table 2022-08-10 08:48:46 +03:00
regd.h rtw88: add regulatory strategy by chip type 2021-09-21 17:51:56 +03:00
rtw8723d_table.c
rtw8723d_table.h
rtw8723d.c wifi: rtw88: use struct instead of macros to set TX desc 2023-06-21 12:41:44 +03:00
rtw8723d.h wifi: rtw88: rtw8723d: Implement RTL8723DS (SDIO) efuse parsing 2023-05-25 19:09:39 +03:00
rtw8723de.c wifi: rtw88: Fix Sparse warning for rtw8723d_hw_spec 2022-05-30 14:06:27 +03:00
rtw8723ds.c wifi: rtw88: Add support for the SDIO based RTL8723DS chipset 2023-05-25 19:09:39 +03:00
rtw8723du.c wifi: rtw88: Add rtw8723du chipset support 2022-12-08 16:48:42 +02:00
rtw8821c_table.c rtw88: 8821c: Enable TX report for management frames 2022-04-12 16:52:05 +03:00
rtw8821c_table.h
rtw8821c.c wifi: rtw88: call rtw8821c_switch_rf_set() according to chip variant 2023-04-20 15:34:38 +03:00
rtw8821c.h wifi: rtw88: rtw8821c: Implement RTL8821CS (SDIO) efuse parsing 2023-02-22 14:31:37 +02:00
rtw8821ce.c wifi: rtw88: Fix Sparse warning for rtw8821c_hw_spec 2022-05-30 14:06:27 +03:00
rtw8821cs.c wifi: rtw88: Add support for the SDIO based RTL8821CS chipset 2023-04-12 15:51:10 +03:00
rtw8821cu.c wifi: rtw88: Add rtw8821cu chipset support 2022-12-08 16:48:42 +02:00
rtw8822b_table.c
rtw8822b_table.h
rtw8822b.c wifi: rtw88: 8822c: extend reserved page number 2023-04-20 15:33:46 +03:00
rtw8822b.h wifi: rtw88: rtw8822b: Implement RTL8822BS (SDIO) efuse parsing 2023-02-22 14:31:37 +02:00
rtw8822be.c wifi: rtw88: Fix sparse warning for rtw8822b_hw_spec 2022-05-30 14:06:26 +03:00
rtw8822bs.c wifi: rtw88: Add support for the SDIO based RTL8822BS chipset 2023-04-12 15:51:09 +03:00
rtw8822bu.c wifi: rtw88: Add rtw8822bu chipset support 2022-12-08 16:48:42 +02:00
rtw8822c_table.c
rtw8822c_table.h
rtw8822c.c wifi: rtw88: 8822c: extend reserved page number 2023-04-20 15:33:46 +03:00
rtw8822c.h wifi: rtw88: rtw8822c: Implement RTL8822CS (SDIO) efuse parsing 2023-02-22 14:31:37 +02:00
rtw8822ce.c wifi: rtw88: Fix Sparse warning for rtw8822c_hw_spec 2022-05-30 14:06:27 +03:00
rtw8822cs.c wifi: rtw88: Add support for the SDIO based RTL8822CS chipset 2023-04-12 15:51:10 +03:00
rtw8822cu.c wifi: rtw88: Add rtw8822cu chipset support 2022-12-08 16:48:42 +02:00
rx.c rtw88: fix incorrect frequency reported 2022-04-12 16:52:05 +03:00
rx.h
sar.c rtw88: change rtw_info() to proper message level 2022-02-22 17:31:13 +02:00
sar.h rtw88: support SAR via kernel common API 2021-12-21 20:22:38 +02:00
sdio.c Merge wireless into wireless-next 2023-06-07 19:49:36 +02:00
sdio.h wifi: rtw88: sdio: Add HCI implementation for SDIO based chipsets 2023-04-12 15:51:08 +03:00
sec.c
sec.h
tx.c wifi: rtw88: remove unused and set but unused leftovers 2023-07-25 17:40:43 +03:00
tx.h wifi: rtw88: Fix AP mode incorrect DTIM behavior 2023-06-21 12:41:45 +03:00
usb.c wifi: rtw88: usb: kill and free rx urbs on probe failure 2023-08-25 13:02:27 +03:00
usb.h wifi: rtw88: remove unused USB bulkout size set 2023-07-25 17:40:43 +03:00
util.c wifi: rtw88: simplify vif iterators 2023-07-25 17:40:43 +03:00
util.h wifi: rtw88: simplify vif iterators 2023-07-25 17:40:43 +03:00
wow.c wifi: rtw88: use RTW_FLAG_POWERON flag to prevent to power on/off twice 2023-02-17 11:33:13 +02:00
wow.h