diff options
| author | Brian Norris <[email protected]> | 2021-11-29 16:47:34 -0800 |
|---|---|---|
| committer | Kalle Valo <[email protected]> | 2021-12-08 20:38:29 +0200 |
| commit | 1b8bb8919ef81bfc8873d223b9361f1685f2106d (patch) | |
| tree | 6eacdefdf8eaf6ec70e2e21ca883794b77ce8cf5 /tools/perf/scripts/python/compaction-times.py | |
| parent | f2f16ae9cc9cba4e3c70941cf6a6443c9ea920f4 (diff) | |
mwifiex: Fix possible ABBA deadlock
Quoting Jia-Ju Bai <[email protected]>:
mwifiex_dequeue_tx_packet()
spin_lock_bh(&priv->wmm.ra_list_spinlock); --> Line 1432 (Lock A)
mwifiex_send_addba()
spin_lock_bh(&priv->sta_list_spinlock); --> Line 608 (Lock B)
mwifiex_process_sta_tx_pause()
spin_lock_bh(&priv->sta_list_spinlock); --> Line 398 (Lock B)
mwifiex_update_ralist_tx_pause()
spin_lock_bh(&priv->wmm.ra_list_spinlock); --> Line 941 (Lock A)
Similar report for mwifiex_process_uap_tx_pause().
While the locking expectations in this driver are a bit unclear, the
Fixed commit only intended to protect the sta_ptr, so we can drop the
lock as soon as we're done with it.
IIUC, this deadlock cannot actually happen, because command event
processing (which calls mwifiex_process_sta_tx_pause()) is
sequentialized with TX packet processing (e.g.,
mwifiex_dequeue_tx_packet()) via the main loop (mwifiex_main_process()).
But it's good not to leave this potential issue lurking.
Fixes: f0f7c2275fb9 ("mwifiex: minor cleanups w/ sta_list_spinlock in cfg80211.c")
Cc: Douglas Anderson <[email protected]>
Reported-by: TOTE Robot <[email protected]>
Link: https://lore.kernel.org/linux-wireless/[email protected]/
Signed-off-by: Brian Norris <[email protected]>
Reviewed-by: Douglas Anderson <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://lore.kernel.org/r/YaV0pllJ5p/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/compaction-times.py')
0 files changed, 0 insertions, 0 deletions