Ping-Ke Shih
107677a8f4
wifi: rtw88: use work to update rate to avoid RCU warning
commit bcafcb959a upstream.
The ieee80211_ops::sta_rc_update must be atomic, because
ieee80211_chan_bw_change() holds rcu_read lock while calling
drv_sta_rc_update(), so create a work to do original things.
Voluntary context switch within RCU read-side critical section!
WARNING: CPU: 0 PID: 4621 at kernel/rcu/tree_plugin.h:318
rcu_note_context_switch+0x571/0x5d0
CPU: 0 PID: 4621 Comm: kworker/u16:2 Tainted: G W OE
Workqueue: phy3 ieee80211_chswitch_work [mac80211]
RIP: 0010:rcu_note_context_switch+0x571/0x5d0
Call Trace:
<TASK>
__schedule+0xb0/0x1460
? __mod_timer+0x116/0x360
schedule+0x5a/0xc0
schedule_timeout+0x87/0x150
? trace_raw_output_tick_stop+0x60/0x60
wait_for_completion_timeout+0x7b/0x140
usb_start_wait_urb+0x82/0x160 [usbcore
usb_control_msg+0xe3/0x140 [usbcore
rtw_usb_read+0x88/0xe0 [rtw_usb
rtw_usb_read8+0xf/0x10 [rtw_usb
rtw_fw_send_h2c_command+0xa0/0x170 [rtw_core
rtw_fw_send_ra_info+0xc9/0xf0 [rtw_core
drv_sta_rc_update+0x7c/0x160 [mac80211
ieee80211_chan_bw_change+0xfb/0x110 [mac80211
ieee80211_change_chanctx+0x38/0x130 [mac80211
ieee80211_vif_use_reserved_switch+0x34e/0x900 [mac80211
ieee80211_link_use_reserved_context+0x88/0xe0 [mac80211
ieee80211_chswitch_work+0x95/0x170 [mac80211
process_one_work+0x201/0x410
worker_thread+0x4a/0x3b0
? process_one_work+0x410/0x410
kthread+0xe1/0x110
? kthread_complete_and_exit+0x20/0x20
ret_from_fork+0x1f/0x30
</TASK>
Cc: stable@vger.kernel.org
Fixes: c1edc86472 ("rtw88: add ieee80211:sta_rc_update ops")
Reported-by: Larry Finger <Larry.Finger@lwfinger.net>
Link: https://lore.kernel.org/linux-wireless/f1e31e8e-f84e-3791-50fb-663a83c5c6e9@lwfinger.net/T/#t
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230508085429.46653-1-pkshih@realtek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-24 17:32:50 +01:00
..
2023-01-24 07:24:37 +01:00
2023-05-24 17:32:36 +01:00
2022-11-09 15:41:27 +01:00
2023-03-10 09:32:32 +01:00
2023-03-30 12:49:09 +02:00
2023-03-11 13:55:16 +01:00
2023-05-24 17:32:43 +01:00
2022-10-12 10:23:24 -07:00
2023-05-24 17:32:39 +01:00
2023-05-24 17:32:40 +01:00
2023-05-11 23:03:05 +09:00
2023-05-11 23:03:26 +09:00
2023-05-11 23:03:40 +09:00
2023-05-11 23:03:35 +09:00
2023-01-24 07:24:35 +01:00
2023-04-13 16:55:31 +02:00
2023-05-11 23:03:16 +09:00
2023-05-11 23:03:04 +09:00
2023-05-17 11:53:40 +02:00
2023-05-11 23:03:05 +09:00
2023-03-10 09:34:25 +01:00
2023-01-07 11:11:40 +01:00
2022-12-31 13:32:38 +01:00
2023-05-11 23:03:37 +09:00
2023-02-09 11:28:23 +01:00
2023-05-17 11:53:28 +02:00
2022-12-31 13:32:39 +01:00
2023-02-09 11:27:59 +01:00
2023-05-24 17:32:36 +01:00
2023-05-11 23:03:27 +09:00
2023-02-09 11:28:04 +01:00
2023-05-01 08:26:27 +09:00
2023-05-24 17:32:45 +01:00
2023-05-24 17:32:41 +01:00
2022-12-31 13:32:45 +01:00
2023-05-11 23:03:38 +09:00
2023-04-13 16:55:18 +02:00
2023-05-11 23:03:16 +09:00
2023-05-11 23:03:29 +09:00
2023-05-17 11:53:34 +02:00
2022-10-12 23:45:29 +02:00
2023-04-06 12:10:58 +02:00
2023-05-11 23:03:27 +09:00
2023-05-11 23:03:35 +09:00
2023-05-11 23:03:35 +09:00
2023-05-11 23:03:28 +09:00
2023-05-11 23:03:34 +09:00
2022-10-08 08:56:37 -07:00
2023-05-24 17:32:36 +01:00
2023-02-09 11:28:04 +01:00
2023-05-11 23:03:36 +09:00
2023-05-11 23:03:31 +09:00
2023-05-17 11:53:28 +02:00
2023-05-24 17:32:41 +01:00
2023-05-24 17:32:38 +01:00
2023-05-24 17:32:45 +01:00
2023-03-22 13:33:56 +01:00
2023-05-24 17:32:35 +01:00
2023-05-24 17:32:37 +01:00
2023-05-24 17:32:42 +01:00
2023-05-24 17:32:41 +01:00
2023-05-11 23:03:11 +09:00
2023-05-17 11:53:29 +02:00
2023-05-24 17:32:50 +01:00
2023-03-22 13:33:46 +01:00
2023-03-10 09:34:20 +01:00
2023-05-11 23:03:22 +09:00
2023-02-09 11:28:25 +01:00
2023-05-11 23:03:28 +09:00
2023-03-10 09:33:01 +01:00
2023-05-24 17:32:42 +01:00
2022-11-09 15:40:32 +01:00
2023-05-11 23:03:29 +09:00
2023-05-11 23:03:16 +09:00
2023-05-24 17:32:41 +01:00
2023-05-11 23:03:37 +09:00
2023-05-24 17:32:42 +01:00
2022-12-31 13:31:56 +01:00
2023-05-11 23:03:34 +09:00
2023-03-10 09:32:56 +01:00
2023-04-06 12:10:44 +02:00
2023-05-11 23:03:37 +09:00
2022-12-31 13:32:00 +01:00
2023-05-11 23:03:16 +09:00
2023-05-24 17:32:35 +01:00
2023-02-01 08:34:05 +01:00
2023-05-11 23:03:16 +09:00
2023-05-11 23:03:33 +09:00
2023-05-24 17:32:46 +01:00
2023-05-24 17:32:47 +01:00
2022-11-09 15:40:14 +01:00
2022-11-10 18:45:40 +01:00
2023-05-17 11:53:28 +02:00
2023-05-24 17:32:42 +01:00
2023-05-24 17:32:40 +01:00
2023-05-11 23:03:31 +09:00
2023-05-24 17:32:40 +01:00
2023-05-24 17:32:37 +01:00
2023-03-30 12:49:29 +02:00
2023-05-11 23:03:37 +09:00
2023-05-11 23:03:41 +09:00
2023-05-24 17:32:44 +01:00
2023-05-24 17:32:37 +01:00
2022-12-31 13:32:38 +01:00
2023-05-24 17:32:49 +01:00
2023-03-22 13:34:03 +01:00
2023-03-10 09:34:32 +01:00
2023-05-11 23:03:41 +09:00
2023-05-24 17:32:33 +01:00
2023-05-11 23:03:10 +09:00
2023-05-11 23:03:31 +09:00
2023-02-01 08:34:26 +01:00
2023-05-17 11:53:34 +02:00
2023-05-11 23:03:11 +09:00