[PATCH 3.19.y-ckt 02/54] [3.19-stable-only] fix backport "KVM: s390: avoid memory overwrites on emergency signal injection"

From: Kamal Mostafa
Date: Mon May 09 2016 - 20:20:33 EST


3.19.8-ckt21 -stable review patch. If anyone has any objections, please let me know.

---8<------------------------------------------------------------

From: Kamal Mostafa <kamal@xxxxxxxxxxxxx>

Fix bad 3.19-stable backport of mainline commit:
b85de33 KVM: s390: avoid memory overwrites on emergency signal injection
(3.19-stable: 2912b8f)

Signed-off-by: Kamal Mostafa <kamal@xxxxxxxxxxxxx>
---
arch/s390/kvm/interrupt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c
index befe999..4d490e9 100644
--- a/arch/s390/kvm/interrupt.c
+++ b/arch/s390/kvm/interrupt.c
@@ -1061,7 +1061,7 @@ static int __inject_sigp_emergency(struct kvm_vcpu *vcpu,
emerg->code, 0, 2);

/* sending vcpu invalid */
- if (kvm_get_vcpu_by_id(vcpu->kvm, emerg.code) == NULL)
+ if (kvm_get_vcpu_by_id(vcpu->kvm, emerg->code) == NULL)
return -EINVAL;

set_bit(emerg->code, li->sigp_emerg_pending);
--
2.7.4