iwlwifi: mvm: fix potential SKB leak on TXQ TX
authorJohannes Berg <johannes.berg@intel.com>
Wed, 11 Dec 2019 09:15:52 +0000 (10:15 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Jan 2020 15:45:30 +0000 (16:45 +0100)
commit503b54ab9666567e1aff98dc207cf3c89b7d2ab3
tree03c62aeda9ceb16193a9282021a3dd13f0703f26
parent1e3c082df32052e77f132a5bb4b2249ef471152c
iwlwifi: mvm: fix potential SKB leak on TXQ TX

commit df2378ab0f2a9dd4cf4501268af1902cc4ebacd8 upstream.

When we transmit after TXQ dequeue, we aren't paying attention to
the return value of the transmit functions, leading to a potential
SKB leak.

Refactor the code a bit (and rename ..._tx to ..._tx_sta) to check
for this happening.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Fixes: cfbc6c4c5b91 ("iwlwifi: mvm: support mac80211 TXQs model")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
drivers/net/wireless/intel/iwlwifi/mvm/tx.c