From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 57182CA9EC8 for ; Fri, 18 Oct 2019 01:48:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3266E21A49 for ; Fri, 18 Oct 2019 01:48:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2409513AbfJRBsY (ORCPT ); Thu, 17 Oct 2019 21:48:24 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:53124 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728754AbfJRBsX (ORCPT ); Thu, 17 Oct 2019 21:48:23 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 77FA2C8CAD8018DAC87A; Fri, 18 Oct 2019 09:48:21 +0800 (CST) Received: from [127.0.0.1] (10.177.96.96) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.439.0; Fri, 18 Oct 2019 09:48:20 +0800 Subject: Re: [PATCH 4.9.y] Revert "net: sit: fix memory leak in sit_init_net()" To: Greg KH , Ajay Kaher CC: , , , , , , , , , , , , , , , References: <1571216634-44834-1-git-send-email-akaher@vmware.com> <20191016183027.GC801860@kroah.com> From: maowenan Message-ID: Date: Fri, 18 Oct 2019 09:48:05 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.0 MIME-Version: 1.0 In-Reply-To: <20191016183027.GC801860@kroah.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.96.96] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/10/17 2:30, Greg KH wrote: > On Wed, Oct 16, 2019 at 02:33:54PM +0530, Ajay Kaher wrote: >> This reverts commit 375d6d454a95ebacb9c6eb0b715da05a4458ffef which is >> commit 07f12b26e21ab359261bf75cfcb424fdc7daeb6d upstream. >> >> Unnecessarily calling free_netdev() from sit_init_net(). >> ipip6_dev_free() of 4.9.y called free_netdev(), so no need >> to call again after ipip6_dev_free(). >> >> Cc: Mao Wenan >> Cc: David S. Miller >> Cc: Greg Kroah-Hartman >> Signed-off-by: Ajay Kaher >> --- >> net/ipv6/sit.c | 1 - >> 1 file changed, 1 deletion(-) >> >> diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c >> index 47ca2a2..16eba7b 100644 >> --- a/net/ipv6/sit.c >> +++ b/net/ipv6/sit.c >> @@ -1856,7 +1856,6 @@ static int __net_init sit_init_net(struct net *net) >> >> err_reg_dev: >> ipip6_dev_free(sitn->fb_tunnel_dev); >> - free_netdev(sitn->fb_tunnel_dev); >> err_alloc_dev: >> return err; >> } >> -- >> 2.7.4 >> > > Mao, are you ok with this change? > > thanks, > > greg k-h > Greg, ipip6_dev_free has already called free_netdev in stable 4.9. Reviewed-by: Mao Wenan > . >