Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751182AbdFDGw6 (ORCPT ); Sun, 4 Jun 2017 02:52:58 -0400 Received: from cmccmta3.chinamobile.com ([221.176.66.81]:19260 "EHLO cmccmta3.chinamobile.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750852AbdFDGwx (ORCPT ); Sun, 4 Jun 2017 02:52:53 -0400 X-Greylist: delayed 544 seconds by postgrey-1.27 at vger.kernel.org; Sun, 04 Jun 2017 02:52:52 EDT X-RM-TRANSID: 2eea5933ac21580-285e1 X-RM-SPAM-FLAG: 00000000 X-RM-TRANSID: 2ee55933ac20438-a1df2 From: Haishuang Yan To: "David S. Miller" , Jesse Gross , Alexey Kuznetsov , James Morris , Hideaki YOSHIFUJI , Patrick McHardy Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Haishuang Yan Subject: [PATCH] sit: reload iphdr in ipip6_rcv Date: Sun, 4 Jun 2017 14:43:43 +0800 Message-Id: <1496558623-11437-1-git-send-email-yanhaishuang@cmss.chinamobile.com> X-Mailer: git-send-email 1.8.3.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 711 Lines: 25 Since iptunnel_pull_header() can call pskb_may_pull(), we must reload any pointer that was related to skb->head. Fixes: a09a4c8dd1ec ("tunnels: Remove encapsulation offloads on decap") Signed-off-by: Haishuang Yan --- net/ipv6/sit.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index 61e5902..af832e7 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c @@ -657,6 +657,7 @@ static int ipip6_rcv(struct sk_buff *skb) if (iptunnel_pull_header(skb, 0, htons(ETH_P_IPV6), !net_eq(tunnel->net, dev_net(tunnel->dev)))) goto out; + iph = ip_hdr(skb); err = IP_ECN_decapsulate(iph, skb); if (unlikely(err)) { -- 1.8.3.1