Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1298164ybg; Fri, 18 Oct 2019 15:26:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqydlsN7+db0cAB95KToRNrKra60gDVSFvvMzReOagbJ8f0O2TLmfCsZxtuMKtfSppK5qI+8 X-Received: by 2002:aa7:c301:: with SMTP id l1mr12113698edq.281.1571437578683; Fri, 18 Oct 2019 15:26:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571437578; cv=none; d=google.com; s=arc-20160816; b=Gc8qN1JoBOQNaeJ0t02hA1m4y/FOQ2XbvoZiOvrd3lJtXBliiZE3XeMiWjrvQbk2xI pn7bEdAUQ/Hi+2ZgAPwQ5Y3We0XDDDOwMhOy0dejtOO2FuYOlsI+XsWNmWbY1gOGuZNl /MSD3SggPHvuDyHNkzds6zSYgVrygkSuMgUfIVo9v1toQ+9ISMeZz3i+mkKCyQfqk7+G u5MAM4bOggNzSQvWt1E81JaMufNqeldo5Fn10pMh6LlQ7NT5yG7WRO3FgGTfhehdvg4u vQ+SHP3tXsK6tll9bc63fe/pB5Z3KCZ1qa3jHdWS4D65OfAtBQ2xeOgjuGfrF7ZShJGS CS+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=WIfWyVERj8AgX0NKMtNYbmUeURqZ0QTvDq53wc2zQ7c=; b=jCafuwXfe+H5dTeDZPZyAubu6koWQHGOoJW1VRdEA3bAPf4Kcg16fI5rP0TMwLf29C sAoYh+LpXfUxInBC9Em+vay0nBHTfcjkqKZ6K1os+KxMDFAGdomMYW/e5L6GHR8k9uG+ bgBSNGafUUGPs644W75/nnsuhCBg3lxrqXlzj1xu/YewKmmk9eY0UoHSbW91dSuO++ng tcjhk4RR1XA8gcmLGCd5jS+uHDvwOnAPrlENqo0HoaPgLMapextVjhFI1yU5GKqfl7G4 xlfbskYdO/VtGxfYcduWK/thi2nuc5TKAchaJ/di4YE9ePQZjT9QTsFI8tsgQgWJTeyM QIdw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v9si1328554eju.406.2019.10.18.15.25.55; Fri, 18 Oct 2019 15:26:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2409509AbfJRBsY (ORCPT + 99 others); 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 > . >