Skip to content

Commit 3597010

Browse files
Carl HuangKalle Valo
authored andcommitted
ath11k: fix crash caused by NULL rx_channel
During connect and disconnect stress test, crashed happened because ar->rx_channel is NULL. Fix it by checking whether ar->rx_channel is NULL. Crash stack is as below: RIP: 0010:ath11k_dp_rx_h_ppdu+0x110/0x230 [ath11k] [ 5028.808963] ath11k_dp_rx_wbm_err+0x14a/0x360 [ath11k] [ 5028.808970] ath11k_dp_rx_process_wbm_err+0x41c/0x520 [ath11k] [ 5028.808978] ath11k_dp_service_srng+0x25e/0x2d0 [ath11k] [ 5028.808982] ath11k_pci_ext_grp_napi_poll+0x23/0x80 [ath11k_pci] [ 5028.808986] net_rx_action+0x27e/0x400 [ 5028.808990] __do_softirq+0xfd/0x2bb [ 5028.808993] irq_exit+0xa6/0xb0 [ 5028.808995] do_IRQ+0x56/0xe0 [ 5028.808997] common_interrupt+0xf/0xf Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Carl Huang <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 292bff9 commit 3597010

File tree

1 file changed

+7
-3
lines changed
  • drivers/net/wireless/ath/ath11k

1 file changed

+7
-3
lines changed

drivers/net/wireless/ath/ath11k/dp_rx.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2294,6 +2294,7 @@ static void ath11k_dp_rx_h_ppdu(struct ath11k *ar, struct hal_rx_desc *rx_desc,
22942294
{
22952295
u8 channel_num;
22962296
u32 center_freq;
2297+
struct ieee80211_channel *channel;
22972298

22982299
rx_status->freq = 0;
22992300
rx_status->rate_idx = 0;
@@ -2314,9 +2315,12 @@ static void ath11k_dp_rx_h_ppdu(struct ath11k *ar, struct hal_rx_desc *rx_desc,
23142315
rx_status->band = NL80211_BAND_5GHZ;
23152316
} else {
23162317
spin_lock_bh(&ar->data_lock);
2317-
rx_status->band = ar->rx_channel->band;
2318-
channel_num =
2319-
ieee80211_frequency_to_channel(ar->rx_channel->center_freq);
2318+
channel = ar->rx_channel;
2319+
if (channel) {
2320+
rx_status->band = channel->band;
2321+
channel_num =
2322+
ieee80211_frequency_to_channel(channel->center_freq);
2323+
}
23202324
spin_unlock_bh(&ar->data_lock);
23212325
ath11k_dbg_dump(ar->ab, ATH11K_DBG_DATA, NULL, "rx_desc: ",
23222326
rx_desc, sizeof(struct hal_rx_desc));

0 commit comments

Comments
 (0)