]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - net/mac80211/sta_info.h
mac80211: fix TX a-MPDU locking
authorJohannes Berg <johannes.berg@intel.com>
Fri, 13 May 2011 11:35:40 +0000 (13:35 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 16 May 2011 18:10:40 +0000 (14:10 -0400)
commitec034b208dc8aa5dc73ec46c3f27e34c5efbf113
tree56140fc3a4115441822b5cc2aa9de5224bcb8654
parent7527a782e187d1214a5b3dc2897ce441033bb4ef
mac80211: fix TX a-MPDU locking

During my quest to make mac80211 not have any RCU
warnings from sparse, I came across the a-MPDU code
again and it wasn't quite clear why it isn't racy.
So instead of assigning the tid_tx array with just
the spinlock held in ieee80211_start_tx_ba_session
use a separate temporary array protected only by
the spinlock and protect all assignments to the
"live" array by both the spinlock and the mutex so
that other code is easily verified to be correct.

Due to pointer assignment atomicity I don't think
this is a real issue, but I'm not sure, especially
on Alpha the current code might be problematic.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/agg-tx.c
net/mac80211/ht.c
net/mac80211/sta_info.h