linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Oliver Upton <oliver.upton@linux.dev>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Marc Zyngier <maz@kernel.org>,
	Christoffer Dall <christoffer.dall@arm.com>,
	James Morse <james.morse@arm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Zenghui Yu <yuzenghui@huawei.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	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()
Date: Mon, 12 Jun 2023 21:23:21 +0200	[thread overview]
Message-ID: <ZIdwqWKxgntYthoB@linux.dev> (raw)
In-Reply-To: <0fc3126f-efb2-4d8c-9896-2c1b281919df@kadam.mountain>

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

           reply	other threads:[~2023-06-12 19:23 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <0fc3126f-efb2-4d8c-9896-2c1b281919df@kadam.mountain>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZIdwqWKxgntYthoB@linux.dev \
    --to=oliver.upton@linux.dev \
    --cc=catalin.marinas@arm.com \
    --cc=christoffer.dall@arm.com \
    --cc=dan.carpenter@linaro.org \
    --cc=james.morse@arm.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=maz@kernel.org \
    --cc=suzuki.poulose@arm.com \
    --cc=will@kernel.org \
    --cc=yuzenghui@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).