Skip to content

Commit 597cb79

Browse files
Wanpeng Libonzini
authored andcommitted
KVM: SEV: Mark nested locking of kvm->lock
Both source and dest vms' kvm->locks are held in sev_lock_two_vms. Mark one with a different subtype to avoid false positives from lockdep. Fixes: c9d61dc (KVM: SEV: accept signals in sev_lock_two_vms) Reported-by: Yiru Xu <[email protected]> Tested-by: Jinrong Liang <[email protected]> Signed-off-by: Wanpeng Li <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent fdba608 commit 597cb79

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kvm/svm/sev.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1565,7 +1565,7 @@ static int sev_lock_two_vms(struct kvm *dst_kvm, struct kvm *src_kvm)
15651565
r = -EINTR;
15661566
if (mutex_lock_killable(&dst_kvm->lock))
15671567
goto release_src;
1568-
if (mutex_lock_killable(&src_kvm->lock))
1568+
if (mutex_lock_killable_nested(&src_kvm->lock, SINGLE_DEPTH_NESTING))
15691569
goto unlock_dst;
15701570
return 0;
15711571

0 commit comments

Comments
 (0)