Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751870AbdFHCtW (ORCPT ); Wed, 7 Jun 2017 22:49:22 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:36473 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751260AbdFHCtV (ORCPT ); Wed, 7 Jun 2017 22:49:21 -0400 Date: Wed, 7 Jun 2017 19:49:17 -0700 From: Alexei Starovoitov To: Haishuang Yan Cc: "=David S. Miller" , Alexey Kuznetsov , James Morris , Hideaki YOSHIFUJI , Patrick McHardy , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Alexei Starovoitov Subject: Re: [PATCH v2 2/2] ip6_tunnel: fix potential issue in __ip6_tnl_rcv Message-ID: <20170608024916.ujy5muoelj6x646i@ast-mbp> References: <1496883476-17445-1-git-send-email-yanhaishuang@cmss.chinamobile.com> <1496883476-17445-2-git-send-email-yanhaishuang@cmss.chinamobile.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1496883476-17445-2-git-send-email-yanhaishuang@cmss.chinamobile.com> User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 440 Lines: 10 On Thu, Jun 08, 2017 at 08:57:56AM +0800, Haishuang Yan wrote: > When __ip6_tnl_rcv fails, the tun_dst won't be freed, so move > skb_dst_set to begin and tun_dst would be freed by kfree_skb. > > CC: Alexei Starovoitov > Fixes: 8d79266bc48c ("ip6_tunnel: add collect_md mode to IPv6 tunnels") > Signed-off-by: Haishuang Yan Good catch. Thanks! Acked-by: Alexei Starovoitov