Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp797313pxk; Thu, 17 Sep 2020 17:06:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwk7zmN/TmJsOe2ccMNHEtgj825+GugNOeDQpdHoDlLMjkw5Sq41GGxphMhvSY39xgJN7EV X-Received: by 2002:a17:906:f90c:: with SMTP id lc12mr32744614ejb.104.1600387568969; Thu, 17 Sep 2020 17:06:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600387568; cv=none; d=google.com; s=arc-20160816; b=knBU5e4Uf0cejpWu47UY2tTv70WqVulXKR625ueIac1lfolXUri3BJeQNH+1PS7J4M TaXdoqDpAUgrjVI+y5CNqNOKY3ZjPQmn8VknZwC8dwxZW24k+gyD2QcAuLVMqZAdpHCh CriMtNwVt6Tj/x6lwbZCIE6YImPOOBqYlnSrs1FQGM3ThBfxFSOREVXWO8+nNoyvIUuk ddrIC5xCA4NeSzQSPlCfnNLgvNC0RoNpWb+eRFT+gg35MUuguvcJNgK61oTmCsxLFBpd TWgeNGljioQGiuEoFWltf4Hv9xAWHphljqblJcEy6NStHSkP+TtkcN5aXz/1kRTxTdGy PY4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=Tk99l5j3E/7q8+KQDr1cLksemXXtIaYBcNeI48cEufc=; b=wJzPIM1s9NyH9fVJ788a50mhuc56tnClmBXPmorbYiKQe4jWzWgFCG2Z2hM1fHXE5p bmfFUEyukgLL/ZXSDz6jhruVnpjfL/QENHycFHQKqcbUbMKmmXHcGvHpTx/Yg/t3d6tT vrcmCdZYyDEe4QiFhH1QsBzSwgi+oNXiG+ZCHzyIAbRj4VrEg/dOSpZx+fbEUXig9EwI sGNf08Bmc0ifhXwJxU/5pPJ50XAm4mbAeJFooCKxg9r/SIYhMLRAiNptO4rbaSCYILml SELJJA/9mHcPskVYbSyO3GqqH7t1vL+q5i7Ve8YewvYryIFG7o8WsGrzy9dLUFE2FLJe i7QA== 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 r15si888365edo.318.2020.09.17.17.05.45; Thu, 17 Sep 2020 17:06:08 -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 S1726269AbgIRAER (ORCPT + 99 others); Thu, 17 Sep 2020 20:04:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726064AbgIRAEQ (ORCPT ); Thu, 17 Sep 2020 20:04:16 -0400 Received: from shards.monkeyblade.net (shards.monkeyblade.net [IPv6:2620:137:e000::1:9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9172DC06174A; Thu, 17 Sep 2020 17:04:16 -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 BEECE136663ED; Thu, 17 Sep 2020 16:47:28 -0700 (PDT) Date: Thu, 17 Sep 2020 17:04:14 -0700 (PDT) Message-Id: <20200917.170414.150393020289404711.davem@davemloft.net> To: liwei391@huawei.com Cc: luobin9@huawei.com, kuba@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, huawei.libin@huawei.com, guohanjun@huawei.com Subject: Re: [PATCH net v2] hinic: fix potential resource leak From: David Miller In-Reply-To: <20200917122950.36878-1-liwei391@huawei.com> References: <20200917122950.36878-1-liwei391@huawei.com> X-Mailer: Mew version 6.8 on Emacs 27.1 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 [2620:137:e000::1:9]); Thu, 17 Sep 2020 16:47:29 -0700 (PDT) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wei Li Date: Thu, 17 Sep 2020 20:29:50 +0800 > In rx_request_irq(), it will just return what irq_set_affinity_hint() > returns. If it is failed, the napi and irq requested are not freed > properly. So add exits for failures to handle these. > > Signed-off-by: Wei Li > --- > v1 -> v2: > - Free irq as well when irq_set_affinity_hint() fails. Applied, thank you.