]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 5.4
authorSasha Levin <sashal@kernel.org>
Thu, 18 Feb 2021 23:15:44 +0000 (18:15 -0500)
committerSasha Levin <sashal@kernel.org>
Thu, 18 Feb 2021 23:15:44 +0000 (18:15 -0500)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-5.4/kvm-sev-fix-double-locking-due-to-incorrect-backport.patch [new file with mode: 0644]
queue-5.4/series [new file with mode: 0644]

diff --git a/queue-5.4/kvm-sev-fix-double-locking-due-to-incorrect-backport.patch b/queue-5.4/kvm-sev-fix-double-locking-due-to-incorrect-backport.patch
new file mode 100644 (file)
index 0000000..1fe09e4
--- /dev/null
@@ -0,0 +1,36 @@
+From e82caf2b92b3a3f1f062418895f7ac44943bb551 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 18 Feb 2021 13:40:58 -0500
+Subject: KVM: SEV: fix double locking due to incorrect backport
+
+From: Paolo Bonzini <pbonzini@redhat.com>
+
+Fix an incorrect line in the 5.4.y and 4.19.y backports of commit
+19a23da53932bc ("Fix unsynchronized access to sev members through
+svm_register_enc_region"), first applied to 5.4.98 and 4.19.176.
+
+Fixes: 1e80fdc09d12 ("KVM: SVM: Pin guest memory when SEV is active")
+Reported-by: Dov Murik <dovmurik@linux.vnet.ibm.com>
+Cc: stable@vger.kernel.org # 5.4.x
+Cc: stable@vger.kernel.org # 4.19.x
+Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/x86/kvm/svm.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
+index 296b0d7570d06..1da558f28aa57 100644
+--- a/arch/x86/kvm/svm.c
++++ b/arch/x86/kvm/svm.c
+@@ -7104,7 +7104,6 @@ static int svm_register_enc_region(struct kvm *kvm,
+       region->uaddr = range->addr;
+       region->size = range->size;
+-      mutex_lock(&kvm->lock);
+       list_add_tail(&region->list, &sev->regions_list);
+       mutex_unlock(&kvm->lock);
+-- 
+2.27.0
+
diff --git a/queue-5.4/series b/queue-5.4/series
new file mode 100644 (file)
index 0000000..ab3e73d
--- /dev/null
@@ -0,0 +1 @@
+kvm-sev-fix-double-locking-due-to-incorrect-backport.patch