Skip to content

Commit 2455672

Browse files
committed
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull kvm fixes from Paolo Bonzini: "Two small fixes for x86: - lockdep WARN due to missing lock nesting annotation - NULL pointer dereference when accessing debugfs" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: x86: Check for rmaps allocation KVM: SEV: Mark nested locking of kvm->lock
2 parents 7a6043c + fffb532 commit 2455672

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

arch/x86/kvm/debugfs.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ static int kvm_mmu_rmaps_stat_show(struct seq_file *m, void *v)
9595
unsigned int *log[KVM_NR_PAGE_SIZES], *cur;
9696
int i, j, k, l, ret;
9797

98+
if (!kvm_memslots_have_rmaps(kvm))
99+
return 0;
100+
98101
ret = -ENOMEM;
99102
memset(log, 0, sizeof(log));
100103
for (i = 0; i < KVM_NR_PAGE_SIZES; i++) {

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)