Re: [PATCH 4/7] KVM: SEV: Add support for SEV intra host migration

From: Paolo Bonzini
Date: Fri Nov 12 2021 - 04:36:16 EST


On 11/11/21 16:49, Paolo Bonzini wrote:
+out_dst_cgroup:
+ if (ret < 0) {
+ sev_misc_cg_uncharge(dst_sev);
+out_dst_put_cgroup:
+ put_misc_cg(dst_sev->misc_cg);
+ dst_sev->misc_cg = NULL;
+ }

Wrong (you must not uncharge if the dst_sev and src_sev cgroup are the same) _and_ unnecessarily complicated.

I'll send an 8/7 patch as a fixup.

Paolo