Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f2cf6500 authored by Sunil Paidimarri's avatar Sunil Paidimarri
Browse files

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: default avatarSunil Paidimarri <hisunil@codeaurora.org>
parent e99d73e0
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -1132,14 +1132,16 @@ 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");
	if (dev != ipa_netdevs[0]) {
		IPAWANDBG("Received pre-SSR packet completion\n");
		dev_kfree_skb_any(skb);
		return;
	}

	if (dev != ipa_netdevs[0]) {
		IPAWANDBG("Received pre-SSR packet completion\n");
	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;
	}

+6 −4
Original line number Diff line number Diff line
@@ -1148,14 +1148,16 @@ 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");
	if (dev != IPA_NETDEV()) {
		IPAWANDBG("Received pre-SSR packet completion\n");
		dev_kfree_skb_any(skb);
		return;
	}

	if (dev != IPA_NETDEV()) {
		IPAWANDBG("Received pre-SSR packet completion\n");
	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;
	}