ThinkPad X1 Carbon Gen 7 (14”) laptop - Lenovo DMI: LENOVO 20QDS3E200/20QDS3E200, BIOS N2HET63W (1.46 ) 06/01/2021 [ 8.058347] iwlwifi 0000:00:14.3: Detected Intel(R) Wireless-AC 9560 160MHz, REV=0x318 00:14.3 Network controller [0280]: Intel Corporation Cannon Point-LP CNVi [Wireless-AC] [8086:9df0] (rev 11) Getting a lockdep warning as described by Johannes: aggregation start: * take sta's rate lock * call driver's rate control * that decides to start aggregation * calls ieee80211_start_tx_ba_session() * takes sta lock aggregation stop: * ieee80211_stop_tx_ba_cb() is called * takes sta lock * releases TXQ from aggregation-related stop by calling ieee80211_agg_start_txq() * calls schedule_and_wake_txq() * calls driver * driver retrieves from, which calls rate control * takes sta's rate lock https://lore.kernel.org/linux-wireless/480c17405d7735bed3148c3085f93e3d278acadd.camel@sipsolutions.net/
Created attachment 298399 [details] full dmesg excerpt [ 23.653199] wlp0s20f3: authenticate with f8:a0:97:6e:c7:e8 [ 23.663855] wlp0s20f3: send auth to f8:a0:97:6e:c7:e8 (try 1/3) [ 23.704840] wlp0s20f3: authenticated [ 23.708089] wlp0s20f3: associate with f8:a0:97:6e:c7:e8 (try 1/3) [ 23.711224] wlp0s20f3: RX AssocResp from f8:a0:97:6e:c7:e8 (capab=0x411 status=0 aid=1) [ 23.715664] wlp0s20f3: associated [ 23.737643] wlp0s20f3: Limiting TX power to 27 (30 - 3) dBm as advertised by f8:a0:97:6e:c7:e8 [ 23.841934] IPv6: ADDRCONF(NETDEV_CHANGE): wlp0s20f3: link becomes ready [ 24.519857] ====================================================== [ 24.519862] WARNING: possible circular locking dependency detected [ 24.519866] 5.14.0-0.rc6.46.fc35.x86_64+debug #1 Not tainted [ 24.519872] ------------------------------------------------------ [ 24.519875] kworker/u16:1/107 is trying to acquire lock: [ 24.519881] ffff8e9dce9600e8 (&sta->rate_ctrl_lock){+.-.}-{2:2}, at: rate_control_get_rate+0xc0/0x140 [mac80211] [ 24.520032] but task is already holding lock: [ 24.520036] ffff8e9dce960130 (&sta->lock){+.-.}-{2:2}, at: ieee80211_stop_tx_ba_cb+0x2e/0x1e0 [mac80211] [ 24.520156] which lock already depends on the new lock. [ 24.520160] the existing dependency chain (in reverse order) is: [ 24.520163] -> #1 (&sta->lock){+.-.}-{2:2}: [ 24.520175] _raw_spin_lock_bh+0x39/0x80 [ 24.520188] ieee80211_start_tx_ba_session+0x10b/0x430 [mac80211] [ 24.520296] __iwl_mvm_rs_tx_status+0x1cf9/0x22e0 [iwlmvm] [ 24.520368] rs_drv_mac80211_tx_status+0x99/0xf0 [iwlmvm] [ 24.520414] rate_control_tx_status+0x9c/0xb0 [mac80211] [ 24.520533] ieee80211_tx_status_ext+0x1e9/0xe60 [mac80211] [ 24.520632] ieee80211_tx_status+0x98/0x140 [mac80211] [ 24.520729] iwl_mvm_rx_tx_cmd+0x5a0/0xdb0 [iwlmvm] [ 24.520773] iwl_mvm_rx_common+0xe1/0x2e0 [iwlmvm] [ 24.520810] iwl_pcie_rx_handle+0x3e9/0xb40 [iwlwifi] [ 24.520860] iwl_pcie_napi_poll_msix+0x2c/0xd0 [iwlwifi] [ 24.520902] __napi_poll.constprop.0+0x29/0x210 [ 24.520915] net_rx_action+0x298/0x380 [ 24.520926] __do_softirq+0xdb/0x4d4 [ 24.520937] do_softirq+0x83/0xb0 [ 24.520948] __local_bh_enable_ip+0xbe/0xd0 [ 24.520957] iwl_pcie_irq_rx_msix_handler+0x126/0x250 [iwlwifi] [ 24.520999] irq_thread_fn+0x1d/0x60 [ 24.521006] irq_thread+0xd2/0x180 [ 24.521012] kthread+0x146/0x170 [ 24.521022] ret_from_fork+0x1f/0x30 [ 24.521034] -> #0 (&sta->rate_ctrl_lock){+.-.}-{2:2}: [ 24.521045] __lock_acquire+0x11fe/0x1e00 [ 24.521054] lock_acquire+0xc4/0x2e0 [ 24.521063] _raw_spin_lock_bh+0x39/0x80 [ 24.521070] rate_control_get_rate+0xc0/0x140 [mac80211] [ 24.521189] ieee80211_tx_h_rate_ctrl+0x18b/0x420 [mac80211] [ 24.521312] ieee80211_xmit_fast_finish+0x1c1/0x1e0 [mac80211] [ 24.521443] ieee80211_tx_dequeue+0x21e/0xce0 [mac80211] [ 24.521561] iwl_mvm_mac_itxq_xmit+0x9d/0x1c0 [iwlmvm] [ 24.521599] ieee80211_agg_start_txq+0xed/0x2c0 [mac80211] [ 24.521707] ieee80211_stop_tx_ba_cb+0xc0/0x1e0 [mac80211] [ 24.521813] ieee80211_ba_session_work+0x1b4/0x2e0 [mac80211] [ 24.521918] process_one_work+0x2ad/0x5c0 [ 24.521931] worker_thread+0x55/0x3c0 [ 24.521941] kthread+0x146/0x170 [ 24.521950] ret_from_fork+0x1f/0x30 [ 24.521961] other info that might help us debug this: [ 24.521965] Possible unsafe locking scenario: [ 24.521968] CPU0 CPU1 [ 24.521971] ---- ---- [ 24.521974] lock(&sta->lock); [ 24.521980] lock(&sta->rate_ctrl_lock); [ 24.521986] lock(&sta->lock); [ 24.521992] lock(&sta->rate_ctrl_lock); [ 24.521998] *** DEADLOCK *** [ 24.522001] 6 locks held by kworker/u16:1/107: [ 24.522007] #0: ffff8e9dc5da0948 ((wq_completion)phy0){+.+.}-{0:0}, at: process_one_work+0x21a/0x5c0 [ 24.522028] #1: ffffb6960031fe70 ((work_completion)(&sta->ampdu_mlme.work)){+.+.}-{0:0}, at: process_one_work+0x21a/0x5c0 [ 24.522047] #2: ffff8e9dce960a40 (&sta->ampdu_mlme.mtx){+.+.}-{3:3}, at: ieee80211_ba_session_work+0x54/0x2e0 [mac80211] [ 24.522161] #3: ffff8e9dce960130 (&sta->lock){+.-.}-{2:2}, at: ieee80211_stop_tx_ba_cb+0x2e/0x1e0 [mac80211] [ 24.522276] #4: ffffffffa7f926a0 (rcu_read_lock){....}-{1:2}, at: ieee80211_agg_start_txq+0x2d/0x2c0 [mac80211] [ 24.522400] #5: ffffffffa7f926a0 (rcu_read_lock){....}-{1:2}, at: iwl_mvm_mac_itxq_xmit+0x41/0x1c0 [iwlmvm] [ 24.522446] stack backtrace: [ 24.522451] CPU: 6 PID: 107 Comm: kworker/u16:1 Not tainted 5.14.0-0.rc6.46.fc35.x86_64+debug #1 [ 24.522460] Hardware name: LENOVO 20QDS3E200/20QDS3E200, BIOS N2HET63W (1.46 ) 06/01/2021 [ 24.522466] Workqueue: phy0 ieee80211_ba_session_work [mac80211] [ 24.522576] Call Trace: [ 24.522584] dump_stack_lvl+0x57/0x72 [ 24.522598] check_noncircular+0xdf/0x100 [ 24.522611] ? check_irq_usage+0x174/0x4a0 [ 24.522623] __lock_acquire+0x11fe/0x1e00 [ 24.522635] ? check_path.constprop.0+0x24/0x50 [ 24.522646] lock_acquire+0xc4/0x2e0 [ 24.522656] ? rate_control_get_rate+0xc0/0x140 [mac80211] [ 24.522772] ? __lock_acquire+0x1214/0x1e00 [ 24.522781] ? __lock_acquire+0xfbd/0x1e00 [ 24.522792] _raw_spin_lock_bh+0x39/0x80 [ 24.522802] ? rate_control_get_rate+0xc0/0x140 [mac80211] [ 24.522913] rate_control_get_rate+0xc0/0x140 [mac80211] [ 24.523027] ieee80211_tx_h_rate_ctrl+0x18b/0x420 [mac80211] [ 24.523152] ieee80211_xmit_fast_finish+0x1c1/0x1e0 [mac80211] [ 24.523272] ieee80211_tx_dequeue+0x21e/0xce0 [mac80211] [ 24.523414] iwl_mvm_mac_itxq_xmit+0x9d/0x1c0 [iwlmvm] [ 24.523456] ieee80211_agg_start_txq+0xed/0x2c0 [mac80211] [ 24.523566] ieee80211_stop_tx_ba_cb+0xc0/0x1e0 [mac80211] [ 24.523677] ieee80211_ba_session_work+0x1b4/0x2e0 [mac80211] [ 24.523788] process_one_work+0x2ad/0x5c0 [ 24.523807] worker_thread+0x55/0x3c0 [ 24.523818] ? process_one_work+0x5c0/0x5c0 [ 24.523830] kthread+0x146/0x170 [ 24.523840] ? set_kthread_struct+0x40/0x40 [ 24.523851] ret_from_fork+0x1f/0x30
Created attachment 298401 [details] lspci -vvnn
WIP patch: https://p.sipsolutions.net/d27dfc58efe3313c.txt
Patch is on the way.