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

Commit 451af8b0 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 cc915a39
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -1144,14 +1144,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
@@ -1157,14 +1157,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;
	}