]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
KVM: s390: vsie: Fix allocation of struct vsie_rmap
authorClaudio Imbrenda <imbrenda@linux.ibm.com>
Thu, 11 Jun 2026 10:48:48 +0000 (12:48 +0200)
committerClaudio Imbrenda <imbrenda@linux.ibm.com>
Thu, 11 Jun 2026 11:50:09 +0000 (13:50 +0200)
The allocation size for struct vsie_rmap in kvm_s390_mmu_cache_topup()
was wrong due to a copy-paste error.

Fix it by using the type name.

Fixes: 12f2f61a9e1a ("KVM: s390: KVM page table management functions: allocation")
CC: stable@vger.kernel.org # 7.1
Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Message-ID: <20260611104850.110313-4-imbrenda@linux.ibm.com>

arch/s390/kvm/dat.c

index 4a41c0247ffa247366b173be80f5fc6a36042a2a..a4fe664f65ee15f59ca53f4b189d22dad086ac4e 100644 (file)
@@ -45,7 +45,7 @@ int kvm_s390_mmu_cache_topup(struct kvm_s390_mmu_cache *mc)
                mc->pts[mc->n_pts] = o;
        }
        for ( ; mc->n_rmaps < KVM_S390_MMU_CACHE_N_RMAPS; mc->n_rmaps++) {
-               o = kzalloc_obj(*mc->rmaps[0], GFP_KERNEL_ACCOUNT);
+               o = kzalloc_obj(struct vsie_rmap, GFP_KERNEL_ACCOUNT);
                if (!o)
                        return -ENOMEM;
                mc->rmaps[mc->n_rmaps] = o;