311-ath10k-fix-deadlock-while-processing-rx_in_ord_ind.patch 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. From: Rajkumar Manoharan <[email protected]>
  2. Date: Thu, 9 Jun 2016 11:33:55 +0530
  3. Subject: [PATCH] ath10k: fix deadlock while processing rx_in_ord_ind
  4. commit 5c86d97bcc1d ("ath10k: combine txrx and replenish task")
  5. introduced deadlock while processing rx in order indication message
  6. for qca6174 based devices. While merging replenish and txrx tasklets,
  7. replenish task should be called out of htt rx ring locking since it
  8. is also try to acquire the same lock.
  9. Unfortunately this issue is not exposed by other solutions (qca988x,
  10. qca99x0 & qca4019), as rx_in_ord_ind message is specific to qca6174
  11. based devices. This patch fixes
  12. =============================================
  13. [ INFO: possible recursive locking detected ]
  14. 4.7.0-rc2-wt-ath+ #1353 Tainted: G E
  15. ---------------------------------------------
  16. swapper/3/0 is trying to acquire lock:
  17. (&(&htt->rx_ring.lock)->rlock){+.-...}, at: [<f8d7ef19>]
  18. ath10k_htt_rx_msdu_buff_replenish+0x29/0x90 [ath10k_core]
  19. but task is already holding lock:
  20. (&(&htt->rx_ring.lock)->rlock){+.-...}, at: [<f8d82cab>]
  21. ath10k_htt_txrx_compl_task+0x21b/0x250 [ath10k_core]
  22. other info that might help us debug this:
  23. Possible unsafe locking scenario:
  24. CPU0
  25. ----
  26. lock(&(&htt->rx_ring.lock)->rlock);
  27. lock(&(&htt->rx_ring.lock)->rlock);
  28. *** DEADLOCK ***
  29. May be due to missing lock nesting notation
  30. 1 lock held by swapper/3/0:
  31. #0: (&(&htt->rx_ring.lock)->rlock){+.-...}, at: [<f8d82cab>]
  32. ath10k_htt_txrx_compl_task+0x21b/0x250 [ath10k_core]
  33. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=119151
  34. Fixes: 5c86d97bcc1d ("ath10k: combine txrx and replenish task")
  35. Reported-by: Mike Lothian <[email protected]>
  36. Signed-off-by: Rajkumar Manoharan <[email protected]>
  37. Signed-off-by: Kalle Valo <[email protected]>
  38. ---
  39. --- a/drivers/net/wireless/ath/ath10k/htt_rx.c
  40. +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c
  41. @@ -1904,7 +1904,6 @@ static void ath10k_htt_rx_in_ord_ind(str
  42. return;
  43. }
  44. }
  45. - ath10k_htt_rx_msdu_buff_replenish(htt);
  46. }
  47. static void ath10k_htt_rx_tx_fetch_resp_id_confirm(struct ath10k *ar,