Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753875AbdLTB1o convert rfc822-to-8bit (ORCPT ); Tue, 19 Dec 2017 20:27:44 -0500 Received: from cmccmta1.chinamobile.com ([221.176.66.79]:22270 "EHLO cmccmta1.chinamobile.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751496AbdLTB1j (ORCPT ); Tue, 19 Dec 2017 20:27:39 -0500 X-RM-TRANSID: 2ee45a39bc87faf-96e17 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 X-RM-TRANSID: 2ee35a39bc85d58-63cc4 Content-Type: text/plain; charset=gb2312 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: [PATCH v2,net-next] ip6_gre: fix a pontential issue in ip6erspan_rcv From: Haishuang Yan In-Reply-To: <20171219.103459.1958757813714459905.davem@davemloft.net> Date: Wed, 20 Dec 2017 09:27:33 +0800 Cc: kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, u9012063@gmail.com Content-Transfer-Encoding: 8BIT Message-Id: <469F603D-3EB9-4A26-A4B0-8FF6B17C423A@cmss.chinamobile.com> References: <1513391125-28227-1-git-send-email-yanhaishuang@cmss.chinamobile.com> <20171219.103459.1958757813714459905.davem@davemloft.net> To: David Miller X-Mailer: Apple Mail (2.3273) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 929 Lines: 27 > On 2017??12??19??, at ????11:34, David Miller wrote: > > From: Haishuang Yan > Date: Sat, 16 Dec 2017 10:25:25 +0800 > >> pskb_may_pull() can change skb->data, so we need to load ipv6h/ershdr at >> the right place. >> >> Fixes: 5a963eb61b7c ("ip6_gre: Add ERSPAN native tunnel support") >> Acked-by: William Tu >> Cc: William Tu >> Signed-off-by: Haishuang Yan > > This patch does not apply: > >> + ipv6h = ipv6_hdr(skb); >> + ershdr = (struct erspan_base_hdr *)skb->data; >> ver = (ntohs(ershdr->ver_vlan) & VER_MASK) >> VER_OFFSET; >> tpi->key = cpu_to_be32(ntohs(ershdr->session_id) & ID_MASK); >> pkt_md = (struct erspan_metadata *)(ershdr + 1); > > There is not "pkt_md = ..." assignment in net-next on this line. > Okay, I will fix it and resubmit another commit, thanks.