Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751942AbdFHCVY (ORCPT ); Wed, 7 Jun 2017 22:21:24 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:35191 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751433AbdFHCVW (ORCPT ); Wed, 7 Jun 2017 22:21:22 -0400 Message-ID: <1496888480.736.51.camel@edumazet-glaptop3.roam.corp.google.com> Subject: Re: [PATCH v2 1/2] ip_tunnel: fix potential issue in ip_tunnel_rcv From: Eric Dumazet To: Haishuang Yan Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Pravin B Shelar , Haishuang Yan Date: Wed, 07 Jun 2017 19:21:20 -0700 In-Reply-To: <1496883476-17445-1-git-send-email-yanhaishuang@cmss.chinamobile.com> References: <1496883476-17445-1-git-send-email-yanhaishuang@cmss.chinamobile.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 443 Lines: 13 On Thu, 2017-06-08 at 08:57 +0800, Haishuang Yan wrote: > When ip_tunnel_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: Pravin B Shelar > Fixes: 2e15ea390e6f ("ip_gre: Add support to collect tunnel metadata.") > Signed-off-by: Haishuang Yan > --- Acked-by: Eric Dumazet Thanks a lot.