[<prev] [next>] [day] [month] [year] [list]
Message-ID: <c856fab1586545cf9779e06aeaca294a@huawei.com>
Date: Sat, 7 Dec 2019 07:13:58 +0000
From: linmiaohe <linmiaohe@...wei.com>
To: Marc Zyngier <maz@...nel.org>
CC: "pbonzini@...hat.com" <pbonzini@...hat.com>,
"rkrcmar@...hat.com" <rkrcmar@...hat.com>,
"james.morse@....com" <james.morse@....com>,
"julien.thierry.kdev@...il.com" <julien.thierry.kdev@...il.com>,
"suzuki.poulose@....com" <suzuki.poulose@....com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"kvmarm@...ts.cs.columbia.edu" <kvmarm@...ts.cs.columbia.edu>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>
Subject: Re: [PATCH] KVM: arm: fix missing free_percpu_irq in
kvm_timer_hyp_init()
Marc Zyngier <maz@...nel.org> wrote:
>On 2019-11-23 02:30, linmiaohe wrote:
>> From: Miaohe Lin <linmiaohe@...wei.com>
>>
>> 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());
>> +
Powered by blists - more mailing lists