From: Jens Freimann Date: Thu, 15 Jan 2015 13:40:34 +0000 (+0100) Subject: KVM: s390: fix bug in interrupt parameter check X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=94d1f564adb9937d71a9509d4e1b64f073ea07ab;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git KVM: s390: fix bug in interrupt parameter check When we convert interrupt data from struct kvm_s390_interrupt to struct kvm_s390_irq we need to check the data in the input parameter not the output parameter. Acked-by: Cornelia Huck Acked-by: Christian Borntraeger Signed-off-by: Jens Freimann Signed-off-by: Christian Borntraeger --- diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c index 6d7513e15560..60d9edd083ec 100644 --- a/arch/s390/kvm/interrupt.c +++ b/arch/s390/kvm/interrupt.c @@ -1354,12 +1354,12 @@ int s390int_to_s390irq(struct kvm_s390_interrupt *s390int, irq->u.stop.flags = s390int->parm; break; case KVM_S390_INT_EXTERNAL_CALL: - if (irq->u.extcall.code & 0xffff0000) + if (s390int->parm & 0xffff0000) return -EINVAL; irq->u.extcall.code = s390int->parm; break; case KVM_S390_INT_EMERGENCY: - if (irq->u.emerg.code & 0xffff0000) + if (s390int->parm & 0xffff0000) return -EINVAL; irq->u.emerg.code = s390int->parm; break;