Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753930AbdLSPfM (ORCPT ); Tue, 19 Dec 2017 10:35:12 -0500 Received: from shards.monkeyblade.net ([184.105.139.130]:51830 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753902AbdLSPfB (ORCPT ); Tue, 19 Dec 2017 10:35:01 -0500 Date: Tue, 19 Dec 2017 10:34:59 -0500 (EST) Message-Id: <20171219.103459.1958757813714459905.davem@davemloft.net> To: yanhaishuang@cmss.chinamobile.com Cc: kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, u9012063@gmail.com Subject: Re: [PATCH v2,net-next] ip6_gre: fix a pontential issue in ip6erspan_rcv From: David Miller In-Reply-To: <1513391125-28227-1-git-send-email-yanhaishuang@cmss.chinamobile.com> References: <1513391125-28227-1-git-send-email-yanhaishuang@cmss.chinamobile.com> X-Mailer: Mew version 6.7 on Emacs 25.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Tue, 19 Dec 2017 07:35:00 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 761 Lines: 20 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.