Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp5596761rwr; Mon, 24 Apr 2023 06:34:23 -0700 (PDT) X-Google-Smtp-Source: AKy350YpX12bJeycBl5mHRFroPtaP1JPrwXKRloMjheHr/DseNairCvCtrXOIrclOjlADASDOwoW X-Received: by 2002:a17:903:124a:b0:1a5:27d2:b6de with SMTP id u10-20020a170903124a00b001a527d2b6demr22022114plh.3.1682343263439; Mon, 24 Apr 2023 06:34:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682343263; cv=none; d=google.com; s=arc-20160816; b=PeGQUN3lrVePGy3rmUDhneehr9MoaWCETL0X0qkgZxJzELgfinShMn0AmQz1e2mXy/ vrzRwpy77i7u/mzl+OUFbkUFcFKsQiopAaqQ8s0aQEguehBqH1XZ15/Fw6Xxhhh8jCgk lHtPjLmE2ai81Pl15AYIXpMfmLQx4laMW5XR6XE+plxflNhORw8Hjce9gXfpHw7kREfY axNP091dgfxZBi6eSCHBUgRFHf+ch4YoMmPuuN5F8oM4srslbvj9ZbKsnR/CGP0eIiOm Pcr7DhWvwqUkdSfEmgWTaq+CUFpDjy2sM7JAFHtEkur6S1JRP0K/dQl6cOshIjt6eMjz Rmmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=NK/B/HTX0CAUywdLgvQ1DgUJupLeg0qgbxmTjmyEyL8=; b=VDZnt+00njJ4GbGYyf1eEU4UYYp4SFZIJhzLJqJQMBOzGWdiIBdPCHDfZ4XqwFBbnh NiKtmQuaBZHyPqVCqjNnrdN5k/kNHc69KpSzIBYE2WwVg2i6rAEZ/fqwHxbYiZhXQk37 j0MKL+j8syNOtycDd++jeUTMBvndS0CtIel1+KuE24UVk2NGgWVMY13qx7I/6NNkTpGA tZClWtmiUuIXRTbSl729L7UmfhGEYfyiNu/t2W+URoFxUJZdN4wRNIwkqFIOcZ6SDMJX ZSZmI3Fp4bBQgNTQ6HX98XWlhYzbYFK1MgSVyfLWqtHgvzamzf2c4ME+hX+IIyMDNtkE eLrQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a8-20020a170902ecc800b001a0ae87878dsi12009269plh.388.2023.04.24.06.34.10; Mon, 24 Apr 2023 06:34:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232569AbjDXNd4 (ORCPT + 99 others); Mon, 24 Apr 2023 09:33:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232484AbjDXNdd (ORCPT ); Mon, 24 Apr 2023 09:33:33 -0400 Received: from hust.edu.cn (unknown [202.114.0.240]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 385E686B9; Mon, 24 Apr 2023 06:33:14 -0700 (PDT) Received: from [IPV6:2001:250:4000:5122:ef2c:4d0d:eb7f:c1d2] ([172.16.0.254]) (user=dzm91@hust.edu.cn mech=PLAIN bits=0) by mx1.hust.edu.cn with ESMTP id 33ODVp3C013119-33ODVp3D013119 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Mon, 24 Apr 2023 21:31:51 +0800 Message-ID: <6df17c8d-1ed3-6059-e821-bd58e370c641@hust.edu.cn> Date: Mon, 24 Apr 2023 21:28:59 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH v4] net: amd: Fix link leak when verifying config failed Content-Language: en-US To: Simon Horman , Gencen Gan Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , hust-os-kernel-patches@googlegroups.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230424104643.182296-1-gangecen@hust.edu.cn> From: Dongliang Mu In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-FEAS-AUTH-USER: dzm91@hust.edu.cn X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/24/23 21:01, Simon Horman wrote: > On Mon, Apr 24, 2023 at 06:46:43PM +0800, Gencen Gan wrote: >> After failing to verify configuration, it returns directly without >> releasing link, which may cause memory leak. >> >> Paolo Abeni thinks that the whole code of this driver is quite >> "suboptimal" and looks unmainatained since at least ~15y, so he >> suggests that we could simply remove the whole driver, please >> take it into consideration. >> >> Simon Horman suggests that the fix label should be set to >> "Linux-2.6.12-rc2" considering that the problem has existed >> since the driver was introduced and the commit above doesn't >> seem to exist in net/net-next. >> >> Fixes: 99c3b0265649 ("Linux-2.6.12-rc2") > > Unless I'm mistaken, this should be: > > Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") > >> Signed-off-by: Gan Gecen >> Reviewed-by: Paolo Abeni >> Reviewed-by: Simon Horman > > I think that tags such as Reviewed-by need to be given explicitly. > And as the above two Reviewed-by tags were not, so it is a bit > odd for them to appear above. Hi Semon, Sorry about the naive mistakes made by Gan Gecen. Our team had repeatedly talked about this issue and written it in our kernel contribution guidance. [1] https://groups.google.com/g/hust-os-kernel-patches/c/GThhx08kecg/m/5p61iz6KAQAJ > >> --- >> v3->v4: modify the 'Fixes:' tag to make it more accurate. >> drivers/net/ethernet/amd/nmclan_cs.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/net/ethernet/amd/nmclan_cs.c b/drivers/net/ethernet/amd/nmclan_cs.c >> index 823a329a921f..0dd391c84c13 100644 >> --- a/drivers/net/ethernet/amd/nmclan_cs.c >> +++ b/drivers/net/ethernet/amd/nmclan_cs.c >> @@ -651,7 +651,7 @@ static int nmclan_config(struct pcmcia_device *link) >> } else { >> pr_notice("mace id not found: %x %x should be 0x40 0x?9\n", >> sig[0], sig[1]); >> - return -ENODEV; >> + goto failed; >> } >> } >> >> -- >> 2.34.1 >> >