* [PATCH] mac80211: Fix tx-mgmt cookie value being left uninitialized.
@ 2012-07-16 16:36 Nicolas Cavallari
2012-07-17 9:27 ` Johannes Berg
0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Cavallari @ 2012-07-16 16:36 UTC (permalink / raw)
To: Johannes Berg, John W. Linville; +Cc: linux-wireless
commit "mac80211: unify SW/offload remain-on-channel"
moved the cookie assignment from ieee80211_mgmt_tx()
to ieee80211_start_roc_work(). But the latter is only
called where offchannel is needed. If offchannel isn't
needed/used, a uninitialized cookie value would be returned
to userspace.
This patch sets the cookie value when offchannel isn't used.
Signed-off-by: Nicolas Cavallari <cavallar@lri.fr>
---
based on wireless-testing.
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index cfdc03f..106f381 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -2493,6 +2493,7 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
skb->dev = sdata->dev;
if (!need_offchan) {
+ *cookie = (unsigned long) skb;
ieee80211_tx_skb(sdata, skb);
ret = 0;
goto out_unlock;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mac80211: Fix tx-mgmt cookie value being left uninitialized.
2012-07-16 16:36 [PATCH] mac80211: Fix tx-mgmt cookie value being left uninitialized Nicolas Cavallari
@ 2012-07-17 9:27 ` Johannes Berg
0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2012-07-17 9:27 UTC (permalink / raw)
To: Nicolas Cavallari; +Cc: John W. Linville, linux-wireless
On Mon, 2012-07-16 at 18:36 +0200, Nicolas Cavallari wrote:
> commit "mac80211: unify SW/offload remain-on-channel"
> moved the cookie assignment from ieee80211_mgmt_tx()
> to ieee80211_start_roc_work(). But the latter is only
> called where offchannel is needed. If offchannel isn't
> needed/used, a uninitialized cookie value would be returned
> to userspace.
>
> This patch sets the cookie value when offchannel isn't used.
Applied, thanks!
johannes
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-07-17 9:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-16 16:36 [PATCH] mac80211: Fix tx-mgmt cookie value being left uninitialized Nicolas Cavallari
2012-07-17 9:27 ` Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).