Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2121227pxa; Mon, 24 Aug 2020 05:57:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZhRXByZcrXQ3H9/hKT5ZbbNlD19OeLjHXKRpLKgCiM5KCIiAhrwibaBQa/O+ySOpa6rOg X-Received: by 2002:a17:906:e2d5:: with SMTP id gr21mr2586549ejb.438.1598273851883; Mon, 24 Aug 2020 05:57:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598273851; cv=none; d=google.com; s=arc-20160816; b=fd9BdY04pGC1rnwn5xuAdWpilaL07qlen+XVi2oc7dRcMevLNFHC7+moAmR08T7QRF +kExmJzz9J4V+UGs2oosBhjlvldnMkSkDY0KzvD6AarGmGSDqxIqC9/dUiRdlBR2G7DP pSsU8truloXf+ea85lRGtgVN0Lh5iQoe2jIzn/tc7lLfoV7Q0edqoxHHfTaY21E3PVVS hlmlN9y7SutfszmM6yF+qX5LWBGMYe8c6G/y20o0dbw0F3jWr2d8rz9M8FQDpfBGV5xq eIOu1V86ZzhUq47v1Casq1hKMPRYRVO864wRVJYUaeMbBnghY3qQfHSkir0SR/G36Q+v KCHg== 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:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=A3aKJMKgyJYpI/FEMX27E5NrHwhAU9enshxA2/HLTlA=; b=MLajS+iC8N9LCNFpoAbZKbJSYuUCTqNzS0CyEiPXMfEBmdCkD8sVw4I9erNopaLd9K zDSEiV+CarSOb6oP72gYgSTeGv4Dd2aJHYcBLdNBWwXimvaGUJZEIuB84XF4O1hLft0X X7wnjRxv4UGROcSXiP08/vuuwDSAPjX3Huznp9S7CQR52UgPZ9U4glCsLJvwTmbXJ9z1 8CDpBpWfMI792gyayidKqWu26J2wRlCIp3gOVvE5J2dg4XhZ2vBqhO3+pl8v35lOiRH1 UUu0xcZ01DuirmVZdO+5LtXj8oBQpmLVa4+XU/59eULdfogyXX4Dq/njBOT5BNnMTTa2 AOnQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n19si2721058eju.331.2020.08.24.05.57.09; Mon, 24 Aug 2020 05:57:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726802AbgHXMyY (ORCPT + 99 others); Mon, 24 Aug 2020 08:54:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725904AbgHXMyY (ORCPT ); Mon, 24 Aug 2020 08:54:24 -0400 Received: from shards.monkeyblade.net (shards.monkeyblade.net [IPv6:2620:137:e000::1:9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E10B8C061573; Mon, 24 Aug 2020 05:54:23 -0700 (PDT) Received: from localhost (unknown [IPv6:2601:601:9f00:477::3d5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id D20B812811098; Mon, 24 Aug 2020 05:37:28 -0700 (PDT) Date: Mon, 24 Aug 2020 05:54:12 -0700 (PDT) Message-Id: <20200824.055412.154537872989436066.davem@davemloft.net> To: dinghao.liu@zju.edu.cn Cc: kjlu@umn.edu, yisen.zhuang@huawei.com, salil.mehta@huawei.com, kuba@kernel.org, hkallweit1@gmail.com, Jason@zx2c4.com, snelson@pensando.io, mst@redhat.com, liuyonglong@huawei.com, yankejian@huawei.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: hns: Fix memleak in hns_nic_dev_probe From: David Miller In-Reply-To: <20200824054444.24142-1-dinghao.liu@zju.edu.cn> References: <20200824054444.24142-1-dinghao.liu@zju.edu.cn> X-Mailer: Mew version 6.8 on Emacs 26.3 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Mon, 24 Aug 2020 05:37:29 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dinghao Liu Date: Mon, 24 Aug 2020 13:44:42 +0800 > hns_nic_dev_probe allocates ndev, but not free it on > two error handling paths, which may lead to memleak. > > Fixes: 63434888aaf1b ("net: hns: net: hns: enet adds support of acpi") > Signed-off-by: Dinghao Liu Applied and queued up for -stable, thanks.