mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
KVM: s390: Fix locking in kvm_s390_set_mem_control()
Add the missing locking around dat_reset_cmma().
Fixes: e38c884df9 ("KVM: s390: Switch to new gmap")
Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Message-ID: <20260623153331.233784-7-imbrenda@linux.ibm.com>
This commit is contained in:
parent
2bd74dce08
commit
9b0bf9b93c
|
|
@ -990,9 +990,11 @@ static int kvm_s390_set_mem_control(struct kvm *kvm, struct kvm_device_attr *att
|
|||
if (!kvm->arch.use_cmma)
|
||||
break;
|
||||
|
||||
guard(mutex)(&kvm->lock);
|
||||
VM_EVENT(kvm, 3, "%s", "RESET: CMMA states");
|
||||
do {
|
||||
start_gfn = dat_reset_cmma(kvm->arch.gmap->asce, start_gfn);
|
||||
scoped_guard(read_lock, &kvm->mmu_lock)
|
||||
start_gfn = dat_reset_cmma(kvm->arch.gmap->asce, start_gfn);
|
||||
cond_resched();
|
||||
} while (start_gfn);
|
||||
ret = 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user