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

Commit 0f8f7fd5 authored by Ravit Katzav's avatar Ravit Katzav
Browse files

msm: ecm_ipa: fix return value of xmit function



In case of error in xmit function, xmit returns -NETDEV_TX_BUSY
and assumes that network stack will free the skb. Network stack
treats negative return values as errors and does not free the skb.
This creates a memory leak. Fix xmit function to return
NETDEV_TX_BUSY instead.

Change-Id: Ibf6e100070edb4b123577e7c396c6f8487a35e27
Acked-by: default avatarAdy Abraham <adya@qti.qualcomm.com>
Signed-off-by: default avatarRavit Katzav <rkatzav@codeaurora.org>
parent 77da3567
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -513,7 +513,7 @@ static netdev_tx_t ecm_ipa_start_xmit(struct sk_buff *skb,

	if (unlikely(ecm_ipa_ctx->state != ECM_IPA_CONNECTED_AND_UP)) {
		ECM_IPA_ERROR("Missing pipe connected and/or iface up\n");
		return -NETDEV_TX_BUSY;
		return NETDEV_TX_BUSY;
	}

	if (unlikely(tx_filter(skb))) {
@@ -534,7 +534,7 @@ static netdev_tx_t ecm_ipa_start_xmit(struct sk_buff *skb,
		ECM_IPA_DEBUG("Outstanding high (%d)- stopping\n",
				ecm_ipa_ctx->outstanding_high);
		netif_stop_queue(net);
		status = -NETDEV_TX_BUSY;
		status = NETDEV_TX_BUSY;
		goto out;
	}