mac80211: Fixing sparse warning at sta_info.c
PATCH 1/1 mac80211: Fixing sparse warning at sta_info.c
The commit 42624d4913a00219a8fdbb4bafd634d1d843be85 created following sparse warning
Quoted 3 lines
net/mac80211/sta_info.c:965:24: warning: incorrect type in assignment (different address spaces)net/mac80211/sta_info.c:965:24: expected structtid_ampdu_tx*tid_txnet/mac80211/sta_info.c:965:24: got structtid_ampdu_tx[noderef] <asn:4>*<noident>
Making use of rcu_dereference to fix the problem.
--- net/mac80211/sta_info.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
net/mac80211/sta_info.c +2 -2
@@ -960,9 +960,9 @@ static int __must_check __sta_info_destroy(struct sta_info *sta)* http://thread.gmane.org/gmane.linux.kernel.wireless.general/81936 */ for (i =0 ; i <STA_TID_NUM ; i++) { -if (!sta->ampdu_mlme.tid_tx[i]) + tid_tx =rcu_dereference (sta->ampdu_mlme.tid_tx[i]); +if (!tid_tx)continue ; - tid_tx = sta->ampdu_mlme.tid_tx[i];if (skb_queue_len (&tid_tx->pending)) {#ifdef CONFIG_MAC80211_HT_DEBUG wiphy_debug(local->hw.wiphy, "TX A-MPDU purging %d "
Signature · 1 line
1.5.4.1
Johannes Berg
maintainerQuoted 7 lines · Yogesh Ashok Powar
The commit
42624d4913a00219a8fdbb4bafd634d1d843be85created following sparse warningQuoted 3 lines
net/mac80211/sta_info.c:965:24: warning: incorrect type in assignment (different address spaces)net/mac80211/sta_info.c:965:24: expected structtid_ampdu_tx*tid_txnet/mac80211/sta_info.c:965:24: got structtid_ampdu_tx[noderef] <asn:4>*<noident>Making use of
rcu_dereferenceto fix the problem.
That doesn't fix any problem. It trades the compiler warning for a runtime warning, so NACK.
You will need something like rcu_dereference_protected() here (although it's not actually protected, but there's also no need to)
johannes