iwlwifi: mvm: fix SKB leak on invalid queue
authorJohannes Berg <johannes.berg@intel.com>
Wed, 11 Dec 2019 09:09:56 +0000 (10:09 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Jan 2020 15:45:30 +0000 (16:45 +0100)
commit1e3c082df32052e77f132a5bb4b2249ef471152c
tree073102c3f8e41df0c86317dfffe14b2c51d638c6
parent68ee631ba110f03d6c415ffce399c9f0e987562e
iwlwifi: mvm: fix SKB leak on invalid queue

commit b9f726c94224e863d4d3458dfec2e7e1284a39ce upstream.

It used to be the case that if we got here, we wouldn't warn
but instead allocate the queue (DQA). With using the mac80211
TXQs model this changed, and we really have nothing to do with
the frame here anymore, hence the warning now.

However, clearly we missed in coding & review that this is now
a pure error path and leaks the SKB if we return 0 instead of
an indication that the SKB needs to be freed. Fix this.

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/tx.c