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=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 4F6B2C43381 for ; Fri, 15 Mar 2019 14:58:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1F29B21872 for ; Fri, 15 Mar 2019 14:58:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728663AbfCOO6a (ORCPT ); Fri, 15 Mar 2019 10:58:30 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:4689 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727013AbfCOO6a (ORCPT ); Fri, 15 Mar 2019 10:58:30 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 910CBD52FDCA1F399EB8; Fri, 15 Mar 2019 22:58:20 +0800 (CST) Received: from [127.0.0.1] (10.184.225.177) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.408.0; Fri, 15 Mar 2019 22:58:10 +0800 Subject: Re: [PATCH] vxlan: remove the redundant gro_cells_destroy() calling. To: Stefano Brivio CC: , , , , , , Mingfangsen , "Zhoukang (A)" , "wangxiaogang (F)" References: <2276c137-d5c0-bdbe-f5c7-5985ffc497ce@huawei.com> <20190315125434.093afbd1@elisabeth> From: Zhiqiang Liu Message-ID: <3cf8fd2c-d0c0-0a22-d5d2-fe285bb628b0@huawei.com> Date: Fri, 15 Mar 2019 22:55:52 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: <20190315125434.093afbd1@elisabeth> Content-Type: text/plain; charset="gbk" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.184.225.177] X-CFilter-Loop: Reflected Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org > On Fri, 15 Mar 2019 18:06:45 +0800 > Zhiqiang Liu wrote: > >> From: "Suanming.Mou" >> >> With ad6c9986bcb6, GRO cells will be destroyed in vxlan_uninit. > > Thanks for cleaning this up. > > I think it would be nice if you could actually explain in the commit > message why this makes the call in vxlan_destroy_tunnels() redundant. > Thanks for your reply. Actually, the patch is a cleanup as you said. In vxlan_destroy_tunnels func, unregister_netdevice_queue is called after gro_cells_destroy func. However, in unregister_netdevice_queue func, the gro_cells_destroy func will also call the gro_cells_destroy func as the following routine: unregister_netdevice_many -> rollback_registered_many -> ndo_uninit -> gro_cells_destroy Fortunately, gro_cells_destroy func will check whether gcells->cells is NULL, so even more than one call gro_cells_destroy would not cause the memory twice-free problem. >> Fixes: ad6c9986bcb6 ("vxlan: Fix GRO cells race condition between receive and link delete") > > I'm not sure a Fixes: tag is appropriate here (and also if this > shouldn't be targeted for net-next) -- in the end, gro_cells_destroy() > there would just return: > > if (!gcells->cells) > return; > >> Signed-off-by: Suanming.Mou As you said, this is just a cleanup. I will remove the Fixes tag in v2 patch. I used the ./scripts/get_maintainer.pl to get the maintainers and mail-list, and the return is given as follows, [root@localhost linux]# ./scripts/get_maintainer.pl 0001-vxlan-remove-the-redundant-gro_cells_destroy-calling.patch "David S. Miller" (odd fixer:NETWORKING DRIVERS,commit_signer:57/57=100%) Petr Machata (commit_signer:30/57=53%,authored:27/57=47%,added_lines:649/1160=56%,removed_lines:265/494=54%) Ido Schimmel (commit_signer:15/57=26%,removed_lines:30/494=6%) Roopa Prabhu (commit_signer:11/57=19%,authored:9/57=16%,added_lines:364/1160=31%,removed_lines:156/494=32%) Sabrina Dubroca (commit_signer:6/57=11%) Stefano Brivio (authored:5/57=9%,added_lines:63/1160=5%) netdev@vger.kernel.org (open list:NETWORKING DRIVERS) linux-kernel@vger.kernel.org (open list) > > Either way, > > Reviewed-by: Stefano Brivio >