From bd09eb993a1a1830b374c9263d3829b0b41b8e49 Mon Sep 17 00:00:00 2001 From: Skylar Chang Date: Sat, 27 Aug 2016 22:53:22 -0700 Subject: [PATCH] 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 Signed-off-by: Skylar Chang --- drivers/platform/msm/ipa/ipa_v2/ipa_dp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/platform/msm/ipa/ipa_v2/ipa_dp.c b/drivers/platform/msm/ipa/ipa_v2/ipa_dp.c index c0ac544fa271..695c8bc4cbc0 100644 --- a/drivers/platform/msm/ipa/ipa_v2/ipa_dp.c +++ b/drivers/platform/msm/ipa/ipa_v2/ipa_dp.c @@ -2397,7 +2397,7 @@ begin: if (skb->len < IPA_PKT_STATUS_SIZE) { WARN_ON(sys->prev_skb != NULL); IPADBG("status straddles buffer\n"); - sys->prev_skb = skb; + sys->prev_skb = skb_copy(skb, GFP_KERNEL); sys->len_partial = skb->len; return rc; } @@ -2482,7 +2482,7 @@ begin: !status->exception) { WARN_ON(sys->prev_skb != NULL); IPADBG("Ins header in next buffer\n"); - sys->prev_skb = skb; + sys->prev_skb = skb_copy(skb, GFP_KERNEL); sys->len_partial = skb->len; return rc; }