Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp117164pxk; Wed, 16 Sep 2020 20:56:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQPYkBl2DRU9NqeJZajUPC2wYPN3lvWmZgaaXG7wUd4W5ZI+pJ9RynDrIFQhWm3mw3BSWF X-Received: by 2002:a05:6402:2c3:: with SMTP id b3mr30957436edx.213.1600315002497; Wed, 16 Sep 2020 20:56:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600315002; cv=none; d=google.com; s=arc-20160816; b=cIDum6g2twsbKQofLi/VjYW19Wkg4E28sOt9rKj+G5hD734JpEjur6mfWje8plAFfY us7xYtXin4Eo5KTL1Rj3Ity53K7KuKBSbiwrBRItUqFsIJSO/tIzx0Q+n3mJDPqXhToS SCU0UdDlPMScTyucp7J7gX1PYNZJguEyOGgsJdJAW1BN/c+2QhyEeh/I+ZqyJ3hA5SeS 3hXwwanJtu0QH2hbyT59vdw8cBNbFmN3gUq5ZrxtO+LLw3hn7E3wK/fagos5emQkELJy t2ixmMCc/iJbT75bl2iYk4DkMOIlG2F401Lr1Puh+JwYcCVbwAvAf55AVsRZLuL6ZuQT J3Bw== 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 :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=feQFoIny4YytRPiT904/w98L8tn7n5wrknLeF+XHmio=; b=Lrrv7JICuey5W1Jw4mGOS5KgSqlJKBKbsgmMXaZMHCgsFKZV375ocDkDi/u9Ah0jlZ L2j/FdtAUmsfnGxqjjnhT004CoUouRLabzJ4ZKp/FwGH5YjGJknbWTkabFJxUIudUPAg esNnvcgL+ek5Yt9rpR+sKx2vSdkYG2LSiP4i0hTn876eHBeGZGiAQLEdZhbhfY0sDEKP ReHaE73CNZHwCIn3aAZLXkM46kEvgS63HAERBptfI1+QH4csHgpP81zITT8p2YZmWS19 SOUHo4klROfmiMJZ7KIC1P3Y7En4+OhoyHFUcSg9RnMqcLRyqYO05LmaWwUNj59+Wl2B dE3w== 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 cb13si9417811edb.153.2020.09.16.20.56.18; Wed, 16 Sep 2020 20:56:42 -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 S1726156AbgIQDzU (ORCPT + 99 others); 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