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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DA194C7EE2E for ; Mon, 12 Jun 2023 19:23:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4JYRAzAqSo00OUg+eqhxEjxOjOEF5EADvoNltSbaQhc=; b=F9zvOOXVP2W0CO Q8gyeEaEwOOSw6Pj0oSOZujsFomjWdd4+vQc4jUy4RFadjgcudd0dwxkg/xECfbHMkynGNLOScKz4 npql6k+hCZFx0QjK+5Rw5Mm2gLrXXg7UM/iZ5OMW60tN7EWt4hTHv3C46YqZMSr4VR1St/hB2RdTj eThKY/Uxprq14zlkI1UbMqGTEiEKj2WsM/cFIV9e8MFpzQgOdGuDkSFBBSGTBO4C8/8gG4hz97CeA ExTAsLGhFAdj8ys1qAiZGdL9HY7yJVlom7sQjkJ4SuMndA8CDTYrPI6KvDH1t5OLPcYoVVMHJLsYw sGQcYWexqgDYlu/wOTuQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q8n8R-0056Ob-2s; Mon, 12 Jun 2023 19:23:27 +0000 Received: from out-32.mta1.migadu.com ([2001:41d0:203:375::20]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q8n8P-0056Ns-2G for linux-arm-kernel@lists.infradead.org; Mon, 12 Jun 2023 19:23:27 +0000 Date: Mon, 12 Jun 2023 21:23:21 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1686597803; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=4VoFEAuVwOY3XqcTpIIfzF8I2Id06bx2MaKaLwxXY24=; b=s7hNrebUk4IUMZ42L93mLuIvclILWgQUOmZt9Um7p44y3XOk+GR0wewDdrEotdQXB+Qmn5 Izt1tMfGFrsV0rJNPPN4WLGTv2IJQEqFRSz9v6QVCHbrYcostEQaog8Jm091h9K9AnIpaM VOHDNEk+Brt/3aHqa7P5j2WgQTXR5D8= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Dan Carpenter Cc: Marc Zyngier , Christoffer Dall , James Morse , Suzuki K Poulose , Zenghui Yu , Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kernel-janitors@vger.kernel.org Subject: Re: [PATCH] KVM: arm64: timers: Fix resource leaks in kvm_timer_hyp_init() Message-ID: References: <0fc3126f-efb2-4d8c-9896-2c1b281919df@kadam.mountain> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <0fc3126f-efb2-4d8c-9896-2c1b281919df@kadam.mountain> X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230612_122325_880360_2F8718AA X-CRM114-Status: GOOD ( 15.30 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Jun 12, 2023 at 11:00:20AM +0300, Dan Carpenter wrote: > On Mon, Jun 12, 2023 at 07:32:52AM +0000, Oliver Upton wrote: > > > + > > > +out_free_ptimer_irq: > > > + if (info->physical_irq > 0) > > > + free_percpu_irq(host_ptimer_irq, kvm_get_running_vcpus()); > > > > nit: we shouldn't even jump to this label in the first place if > > there was no ptimer irq to set up... Maybe just drop the condition? > > > > The condition is not necessary but I added it deliberately for > readability and in case we ever add more allocations to this function. > I want to keep it. Fair enough. And if your fix is any indicator, we're liable to screw up error handling again in the future :) > > > out_free_irq: > > > > I'd prefer this label be renamed 'out_free_vtimer_irq' to make it > > unambiguous. > > I would prefer this too, but I left it out because I don't like to > rename things unnecessarily. However, since we both prefer this, then > I will rename it. Thanks! Please do send out a v2 when you have a moment, as I'd like to pick this up for 6.5. -- Thanks, Oliver _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel