linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] KVM: arm64: timers: Fix resource leaks in kvm_timer_hyp_init()
       [not found]   ` <0fc3126f-efb2-4d8c-9896-2c1b281919df@kadam.mountain>
@ 2023-06-12 19:23     ` Oliver Upton
  0 siblings, 0 replies; only message in thread
From: Oliver Upton @ 2023-06-12 19:23 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Marc Zyngier, Christoffer Dall, James Morse, Suzuki K Poulose,
	Zenghui Yu, Catalin Marinas, Will Deacon, linux-arm-kernel,
	kvmarm, kernel-janitors

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-06-12 19:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <e0dd820f-52d2-4c54-97f3-5aa02e0bd6e0@kili.mountain>
     [not found] ` <ZIbKJPx2RR0Le7Zl@linux.dev>
     [not found]   ` <0fc3126f-efb2-4d8c-9896-2c1b281919df@kadam.mountain>
2023-06-12 19:23     ` [PATCH] KVM: arm64: timers: Fix resource leaks in kvm_timer_hyp_init() Oliver Upton

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).