linux/drivers/net/wireless/ath/ath10k
Rajkumar Manoharan e50525bef5 ath10k: fix deadlock while processing rx_in_ord_ind
commit 5c86d97bcc ("ath10k: combine txrx and replenish task")
introduced deadlock while processing rx in order indication message
for qca6174 based devices. While merging replenish and txrx tasklets,
replenish task should be called out of htt rx ring locking since it
is also try to acquire the same lock.

Unfortunately this issue is not exposed by other solutions (qca988x,
qca99x0 & qca4019), as rx_in_ord_ind message is specific to qca6174
based devices. This patch fixes

=============================================
[ INFO: possible recursive locking detected ]
4.7.0-rc2-wt-ath+ #1353 Tainted: G            E
---------------------------------------------
swapper/3/0 is trying to acquire lock:
 (&(&htt->rx_ring.lock)->rlock){+.-...}, at: [<f8d7ef19>]
ath10k_htt_rx_msdu_buff_replenish+0x29/0x90 [ath10k_core]

but task is already holding lock:
 (&(&htt->rx_ring.lock)->rlock){+.-...}, at: [<f8d82cab>]
ath10k_htt_txrx_compl_task+0x21b/0x250 [ath10k_core]

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(&(&htt->rx_ring.lock)->rlock);
  lock(&(&htt->rx_ring.lock)->rlock);

 *** DEADLOCK ***

 May be due to missing lock nesting notation

1 lock held by swapper/3/0:
 #0:  (&(&htt->rx_ring.lock)->rlock){+.-...}, at: [<f8d82cab>]
ath10k_htt_txrx_compl_task+0x21b/0x250 [ath10k_core]

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=119151
Fixes: 5c86d97bcc ("ath10k: combine txrx and replenish task")
Reported-by: Mike Lothian <mike@fireburn.co.uk>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-06-14 15:06:17 +03:00
..
ahb.c ath10k: expose hif ops for ahb 2016-01-28 10:47:28 +02:00
ahb.h ath10k: expose hif ops for ahb 2016-01-28 10:47:28 +02:00
bmi.c
bmi.h
ce.c ath10k: fix checkpatch warnings related to spaces 2016-04-14 17:30:51 +03:00
ce.h ath10k: fix checkpatch warnings related to spaces 2016-04-14 17:30:51 +03:00
core.c ath10k: fix crash related to printing features 2016-06-07 14:35:55 +03:00
core.h ath10k: update bss channel survey information 2016-05-06 18:55:37 +03:00
debug.c ath10k: move htt_op_version to struct ath10k_fw_file 2016-04-20 20:00:27 +03:00
debug.h ath10k: fix checkpatch warnings related to spaces 2016-04-14 17:30:51 +03:00
debugfs_sta.c ath10k: add debugfs support for Per STA total rx duration 2016-01-26 16:47:37 +02:00
hif.h
htc.c
htc.h ath10k: fix checkpatch warnings related to spaces 2016-04-14 17:30:51 +03:00
htt_rx.c ath10k: fix deadlock while processing rx_in_ord_ind 2016-06-14 15:06:17 +03:00
htt_tx.c ath10k: move fw_features to struct ath10k_fw_file 2016-04-20 20:00:25 +03:00
htt.c ath10k: move htt_op_version to struct ath10k_fw_file 2016-04-20 20:00:27 +03:00
htt.h ath10k: move htt_op_version to struct ath10k_fw_file 2016-04-20 20:00:27 +03:00
hw.c ath10k: include qca4019 register map table 2016-01-28 10:47:20 +02:00
hw.h ath10k: remove deprecated firmware API 1 support 2016-04-20 20:00:22 +03:00
Kconfig ath10k: add reset ctrl related functions in ahb 2016-01-28 10:47:24 +02:00
mac.c ath10k: fix deadlock when peer cannot be created 2016-06-06 20:18:45 +03:00
mac.h ath10k: add dynamic tx mode switch config support for qca4019 2016-04-19 18:10:46 +03:00
Makefile ath10k: add basic skeleton to support ahb 2016-01-28 10:47:19 +02:00
p2p.c
p2p.h
pci.c ath10k: remove deprecated firmware API 1 support 2016-04-20 20:00:22 +03:00
pci.h ath10k: remove MSI range support 2016-04-12 21:27:24 +03:00
rx_desc.h
spectral.c
spectral.h
swap.c ath10k: remove enum ath10k_swap_code_seg_bin_type 2016-04-20 20:00:30 +03:00
swap.h ath10k: remove enum ath10k_swap_code_seg_bin_type 2016-04-20 20:00:30 +03:00
targaddrs.h ath10k: fix checkpatch warnings related to spaces 2016-04-14 17:30:51 +03:00
testmode_i.h
testmode.c ath10k: switch testmode to use ath10k_core_fetch_firmware_api_n() 2016-04-20 20:00:29 +03:00
testmode.h
thermal.c
thermal.h ath10k: fix checkpatch warnings related to spaces 2016-04-14 17:30:51 +03:00
trace.c
trace.h ath10k: add hw_rev to trace events to support pktlog 2016-03-03 19:20:00 +02:00
txrx.c ath10k: add some sanity checks to peer_map_event() functions 2016-04-19 18:10:46 +03:00
txrx.h ath10k: move mgmt descriptor limit handle under mgmt_tx 2016-03-18 09:52:27 +02:00
wmi-ops.h ath10k: implement wmi_pdev_bss_chan_info_request 2016-05-06 18:55:37 +03:00
wmi-tlv.c ath10k: add a support of set_tsf on vdev interface 2016-04-12 21:26:24 +03:00
wmi-tlv.h ath10k: fix checkpatch warnings related to spaces 2016-04-14 17:30:51 +03:00
wmi.c ath10k: suppress warnings when getting wmi peer_rate_code_list event 2016-05-11 22:53:06 +03:00
wmi.h ath10k: handle pdev_chan_info wmi event 2016-05-06 18:55:37 +03:00
wow.c ath10k: move fw_features to struct ath10k_fw_file 2016-04-20 20:00:25 +03:00
wow.h