linux/drivers/net/wireless/marvell
Douglas Anderson e0b636e5ee mwifiex: Don't release tx_ba_stream_tbl_lock while iterating
Despite the macro list_for_each_entry_safe() having the word "safe" in
the name, it's still not actually safe to release the list spinlock
while iterating over the list.  The "safe" in the macro name actually
only means that it's safe to delete the current entry while iterating
over the list.

Releasing the spinlock while iterating over the list means that someone
else could come in and adjust the list while we don't have the
spinlock.  If they do that it can totally mix up our iteration and fully
corrupt the list.  Later iterating over a corrupted list while holding a
spinlock and having IRQs off can cause all sorts of hard to debug
problems.

As evidenced by the other call to
mwifiex_11n_delete_tx_ba_stream_tbl_entry() in
mwifiex_11n_delete_all_tx_ba_stream_tbl(), it's actually safe to skip
the spinlock release.  Let's do that.

No known problems are fixed by this patch, but it could fix all sorts of
weird problems and it should be very safe.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-05-19 09:01:55 +03:00
..
libertas libertas: check return value of alloc_workqueue 2017-04-26 12:03:24 +03:00
libertas_tf wireless: Set NL80211_EXT_FEATURE_CQM_RSSI_LIST in multiple drivers 2017-03-06 09:21:39 +01:00
mwifiex mwifiex: Don't release tx_ba_stream_tbl_lock while iterating 2017-05-19 09:01:55 +03:00
Kconfig
Makefile
mwl8k.c mac80211: separate encoding/bandwidth from flags 2017-04-28 10:41:45 +02:00