msm: ipa: Fix the memory leak on exception
on embedded data path, memory leaked on exception
data packets. Free the skb before returning.
Change-Id: I01434ce0b58b5162c8e7aec1d43a7c66a7eaac44
CRs-Fixed: 1037824
Signed-off-by: Sunil Paidimarri <hisunil@codeaurora.org>
This commit is contained in:
parent
cc915a3931
commit
451af8b02c
2 changed files with 14 additions and 10 deletions
|
@ -1144,17 +1144,19 @@ static void apps_ipa_tx_complete_notify(void *priv,
|
|||
struct net_device *dev = (struct net_device *)priv;
|
||||
struct wwan_private *wwan_ptr;
|
||||
|
||||
if (evt != IPA_WRITE_DONE) {
|
||||
IPAWANDBG("unsupported event on Tx callback\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (dev != ipa_netdevs[0]) {
|
||||
IPAWANDBG("Received pre-SSR packet completion\n");
|
||||
dev_kfree_skb_any(skb);
|
||||
return;
|
||||
}
|
||||
|
||||
if (evt != IPA_WRITE_DONE) {
|
||||
IPAWANERR("unsupported evt on Tx callback, Drop the packet\n");
|
||||
dev_kfree_skb_any(skb);
|
||||
dev->stats.tx_dropped++;
|
||||
return;
|
||||
}
|
||||
|
||||
wwan_ptr = netdev_priv(dev);
|
||||
atomic_dec(&wwan_ptr->outstanding_pkts);
|
||||
__netif_tx_lock_bh(netdev_get_tx_queue(dev, 0));
|
||||
|
|
|
@ -1157,17 +1157,19 @@ static void apps_ipa_tx_complete_notify(void *priv,
|
|||
struct net_device *dev = (struct net_device *)priv;
|
||||
struct ipa3_wwan_private *wwan_ptr;
|
||||
|
||||
if (evt != IPA_WRITE_DONE) {
|
||||
IPAWANDBG("unsupported event on Tx callback\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (dev != IPA_NETDEV()) {
|
||||
IPAWANDBG("Received pre-SSR packet completion\n");
|
||||
dev_kfree_skb_any(skb);
|
||||
return;
|
||||
}
|
||||
|
||||
if (evt != IPA_WRITE_DONE) {
|
||||
IPAWANERR("unsupported evt on Tx callback, Drop the packet\n");
|
||||
dev_kfree_skb_any(skb);
|
||||
dev->stats.tx_dropped++;
|
||||
return;
|
||||
}
|
||||
|
||||
wwan_ptr = netdev_priv(dev);
|
||||
atomic_dec(&wwan_ptr->outstanding_pkts);
|
||||
__netif_tx_lock_bh(netdev_get_tx_queue(dev, 0));
|
||||
|
|
Loading…
Add table
Reference in a new issue