[lkml]   [2019]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] KVM: arm: fix missing free_percpu_irq in kvm_timer_hyp_init()
Marc Zyngier <> wrote:
>On 2019-11-23 02:30, linmiaohe wrote:
>> From: Miaohe Lin <>
>> When host_ptimer_irq request irq resource failed, we forget to release
>> the host_vtimer_irq resource already requested.
>> Fix this missing irq release and other similar scenario.
>That's really not a big deal, as nothing but KVM can use the timers anyway, but I guess it doesn't hurt to be correct.

I think It's a good practice to release the never used resources though it may be harmless.

>> -out_free_irq:
>> +
>> +out_free_ptimer_irq:
>> + free_percpu_irq(host_ptimer_irq, kvm_get_running_vcpus());
>> +out_disable_gic_state:
>> + if (has_gic)
>> + static_branch_disable(&has_gic_active_state);
>Given that we're failing the init of KVM, this is totally superfluous. Also, this state is still valid, no matter what happens (the GIC is not going away from under our feet).

Would you like a v2 patch without out_disable_gic_state cleanup ? If so, I would send a new one. But if you
think this patch isn't worth to pick up, I would drop it.

Many thanks for your review.

>> +out_free_vtimer_irq:
>> free_percpu_irq(host_vtimer_irq, kvm_get_running_vcpus());
>> +
 \ /
  Last update: 2019-12-07 08:14    [W:0.023 / U:2.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site