Skip to content

Fix CSA locking issues

Simon Wunderlich linux-wireless 2 versions Applied

Status from this message: Applied. Since this didn't apply to mac80211.git, I've taken it into

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 2 repliesApplied
  2. v14 patches 0 repliesSuperseded

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/5cfg80211: protect beacon changing functions with wdev-locknet/wireless/nl80211.c+19 -30 replies
2/5mac80211: modify beacon using sdata/wdev-lock, not rtnl locknet/mac80211/cfg.c net/mac80211/ieee80211_i.h+15 -81 reply
3/5cfg80211/mac80211/ath6kl: acquire wdev lock outside ch_switch_notifydrivers/net/wireless/ath/ath6kl/cfg80211.c include/net/cfg80211.h net/mac80211/cfg.c +1 more+22 -130 replies
4/5mac80211: don't cancel csa finalize work within stop_apnet/mac80211/cfg.c+0 -10 replies
5/5mac80211: don't leak next beacon when csa is abortednet/mac80211/cfg.c+3 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCHv2 0/5] Fix CSA locking issues

Unfortunately my channel switch announcement patches contained locking issues which I didn't notice during my test due to bad configuration. Johannes pointed them out, so here is my attempt to fix them. This series attempts to fix two issues:

* There are "suspicious rcu_dereference_protected() usage" problems for ieee80211_assign_beacon and ieee80211_ibss_csa_beacon because the respective locking was missing
* There is a circular dependency between the wdev/sdata-lock and the csa_finalize worker lock (see description in patch 3).

This is another update. Changes from the PATCH series:
* split first patch into mac80211 and cfg80211 part
* simplify memory leak fix

Cheers,
Simon

Simon Wunderlich (5):
cfg80211: protect beacon changing functions with wdev-lock
mac80211: modify beacon using sdata/wdev-lock, not rtnl lock cfg80211/mac80211/ath6kl: acquire wdev lock outside ch_switch_notify
mac80211: don't cancel csa finalize work within stop_ap
mac80211: don't leak next beacon when csa is aborted

 drivers/net/wireless/ath/ath6kl/cfg80211.c |    2 ++
 include/net/cfg80211.h                     |    3 +-
 net/mac80211/cfg.c                         |   45 ++++++++++++++++++----------
 net/mac80211/ieee80211_i.h                 |    3 ++
 net/wireless/nl80211.c                     |   31 +++++++++++++------
 5 files changed, 59 insertions(+), 25 deletions(-)
Signature · 1 line
1.7.10.4