mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-22 17:01:14 +00:00
mac80211: fix mgmt-tx abort cookie and leak
If a mgmt-tx operation is aborted before it runs, the wrong
cookie is reported back to userspace, and the ack_skb gets
leaked since the frame is freed directly instead of freeing
it using ieee80211_free_txskb(). Fix that.
Fixes: 3b79af973c
("mac80211: stop using pointers as userspace cookies")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
856142cdaa
commit
e673a65952
1 changed files with 2 additions and 3 deletions
|
@ -308,11 +308,10 @@ void ieee80211_roc_notify_destroy(struct ieee80211_roc_work *roc, bool free)
|
|||
|
||||
/* was never transmitted */
|
||||
if (roc->frame) {
|
||||
cfg80211_mgmt_tx_status(&roc->sdata->wdev,
|
||||
(unsigned long)roc->frame,
|
||||
cfg80211_mgmt_tx_status(&roc->sdata->wdev, roc->mgmt_tx_cookie,
|
||||
roc->frame->data, roc->frame->len,
|
||||
false, GFP_KERNEL);
|
||||
kfree_skb(roc->frame);
|
||||
ieee80211_free_txskb(&roc->sdata->local->hw, roc->frame);
|
||||
}
|
||||
|
||||
if (!roc->mgmt_tx_cookie)
|
||||
|
|
Loading…
Reference in a new issue