Thread (7 messages) flat view 7 messages, 2 authors, 2022-01-25

Re: [PATCH v2 4/4] KVM: PPC: Decrement module refcount if init_vm fails

From: Fabiano Rosas <hidden>
Date: 2022-01-25 15:09:29

Nicholas Piggin [off-list ref] writes:
Excerpts from Fabiano Rosas's message of January 25, 2022 8:08 am:
quoted
We increment the reference count for KVM-HV/PR before the call to
kvmppc_core_init_vm. If that function fails we need to decrement the
refcount.

Signed-off-by: Fabiano Rosas <redacted>
---
Caught this while testing Nick's LPID patches by looking at
/sys/module/kvm_hv/refcnt
Nice catch. Is this the only change in the series?
Yes.
You can just use kvm_ops->owner like try_module_get() does I think? Also
try_module_get works on a NULL module same as module_put by the looks,
so you could adjust that in this patch to remove the NULL check so it
is consistent with the put.
Sure, I'll send a v3.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help