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

Commit 85ac4a2e authored by Ravit Katzav's avatar Ravit Katzav
Browse files

msm: rndis_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: I1147304e9f14ae95bd45b6a3fe0f76cc0ac0ac8e
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
@@ -841,7 +841,7 @@ static netdev_tx_t rndis_ipa_start_xmit(struct sk_buff *skb,

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

	if (unlikely(tx_filter(skb))) {
@@ -865,7 +865,7 @@ static netdev_tx_t rndis_ipa_start_xmit(struct sk_buff *skb,
				rndis_ipa_ctx->outstanding_high);
		netif_stop_queue(net);
		RNDIS_IPA_DEBUG("send  queue was stopped");
		status = -NETDEV_TX_BUSY;
		status = NETDEV_TX_BUSY;
		goto out;
	}