msm: ipa: fix skb recycle logic

skbs are recycled on LAN pipe. This changes
fixes a bug where the skb was freed before recycle.

Change-Id: I35734cd41aee8bdd2764d6307f76bedcb916a07b
CRs-Fixed: 1060534
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
This commit is contained in:
Skylar Chang 2016-08-27 22:53:22 -07:00 committed by Gerrit - the friendly Code Review server
parent b1750ed67d
commit bd09eb993a

View file

@ -2397,7 +2397,7 @@ begin:
if (skb->len < IPA_PKT_STATUS_SIZE) { if (skb->len < IPA_PKT_STATUS_SIZE) {
WARN_ON(sys->prev_skb != NULL); WARN_ON(sys->prev_skb != NULL);
IPADBG("status straddles buffer\n"); IPADBG("status straddles buffer\n");
sys->prev_skb = skb; sys->prev_skb = skb_copy(skb, GFP_KERNEL);
sys->len_partial = skb->len; sys->len_partial = skb->len;
return rc; return rc;
} }
@ -2482,7 +2482,7 @@ begin:
!status->exception) { !status->exception) {
WARN_ON(sys->prev_skb != NULL); WARN_ON(sys->prev_skb != NULL);
IPADBG("Ins header in next buffer\n"); IPADBG("Ins header in next buffer\n");
sys->prev_skb = skb; sys->prev_skb = skb_copy(skb, GFP_KERNEL);
sys->len_partial = skb->len; sys->len_partial = skb->len;
return rc; return rc;
} }