ath10k: Protect ath10k_htt_rx_ring_free with rx_ring.lock
PATCH 1/1 ath10k: Protect ath10k_htt_rx_ring_free with rx_ring.lock
From: Ben Greear <[email protected]>
While debugging driver crashes related to a buggy firmware crashing under load, I noticed that ath10k_htt_rx_ring_free could be called without being under lock. I'm not sure if this is the root cause of the crash or not, but it seems prudent to protect it.
--- drivers/net/wireless/ath/ath10k/htt_rx.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/wireless/ath/ath10k/htt_rx.c +4 -1
@@ -266,11 +266,12 @@ int ath10k_htt_rx_ring_refill(struct ath10k *ar)spin_lock_bh (&htt->rx_ring.lock); ret =ath10k_htt_rx_ring_fill_n (htt, (htt->rx_ring.fill_level - htt->rx_ring.fill_cnt)); -spin_unlock_bh (&htt->rx_ring.lock);if (ret)ath10k_htt_rx_ring_free (htt); +spin_unlock_bh (&htt->rx_ring.lock); +return ret; }
@@ -282,7 +283,9 @@ void ath10k_htt_rx_free(struct ath10k_htt *htt)skb_queue_purge (&htt->rx_in_ord_compl_q);skb_queue_purge (&htt->tx_fetch_ind_q); +spin_lock_bh (&htt->rx_ring.lock);ath10k_htt_rx_ring_free (htt); +spin_unlock_bh (&htt->rx_ring.lock); dma_free_coherent(htt->ar->dev, htt->rx_ops->htt_get_rx_ring_size(htt),
Signature · 1 line
2.4.11
Quoted 9 lines · Ben Greear
From: Ben Greear <[email protected]>
While debugging driver crashes related to a buggy firmware crashing under load, I noticed that
ath10k_htt_rx_ring_freecould be called without being under lock. I'm not sure if this is the root cause of the crash or not, but it seems prudent to protect it.Signed-off-by Ben Greear <[email protected]>
Failed to apply, please use ath.git master branch as the baseline. Also document the tested hardware and firmware versions in the commit log.
https://wireless.wiki.kernel.org/en/users/drivers/ath10k/submittingpatches
error: patch failed: drivers/net/wireless/ath/ath10k/htt_rx.c:282
error: drivers/net/wireless/ath/ath10k/htt_rx.c: patch does not apply stg import: Diff does not apply cleanly
Patch set to Changes Requested.
Signature · 3 lines
https://patchwork.kernel.org/patch/10453105/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Quoted 9 lines · Ben Greear
From: Ben Greear <[email protected]>
While debugging driver crashes related to a buggy firmware crashing under load, I noticed that
ath10k_htt_rx_ring_freecould be called without being under lock. I'm not sure if this is the root cause of the crash or not, but it seems prudent to protect it.Signed-off-by Ben Greear <[email protected]>
Failed to apply, please use ath.git master branch as the baseline. Also document the tested hardware and firmware versions in the commit log.
https://wireless.wiki.kernel.org/en/users/drivers/ath10k/submittingpatches
error: patch failed: drivers/net/wireless/ath/ath10k/htt_rx.c:282
error: drivers/net/wireless/ath/ath10k/htt_rx.c: patch does not apply stg import: Diff does not apply cleanly
Patch set to Changes Requested.
Signature · 9 lines
https://patchwork.kernel.org/patch/10453105/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches _______________________________________________ ath10k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath10k