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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 536E4C433E2 for ; Thu, 17 Sep 2020 03:55:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 203E220707 for ; Thu, 17 Sep 2020 03:55:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726178AbgIQDzU (ORCPT ); Wed, 16 Sep 2020 23:55:20 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:54686 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725886AbgIQDzS (ORCPT ); Wed, 16 Sep 2020 23:55:18 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 40B1A3DAAB07664918D2; Thu, 17 Sep 2020 11:55:17 +0800 (CST) Received: from [10.174.178.63] (10.174.178.63) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.487.0; Thu, 17 Sep 2020 11:55:11 +0800 Subject: Re: [PATCH] hinic: fix potential resource leak To: "luobin (L)" , "David S. Miller" , Jakub Kicinski CC: , , , References: <20200917030307.47195-1-liwei391@huawei.com> From: "liwei (GF)" Message-ID: <30debf33-49b9-3ac1-cf2a-4ee2c0f1f13d@huawei.com> Date: Thu, 17 Sep 2020 11:55:10 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.178.63] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi luobin, On 2020/9/17 11:44, luobin (L) wrote: > On 2020/9/17 11:03, Wei Li wrote: >> + err = irq_set_affinity_hint(rq->irq, &rq->affinity_mask); >> + if (err) >> + goto err_irq; >> + >> + return 0; >> + >> +err_irq: >> + rx_del_napi(rxq); >> + return err; > If irq_set_affinity_hint fails, irq should be freed as well. > Yes, indeed. I will fix that in the next spin. Thanks, Wei