Commit 94d1f564 authored by Jens Freimann's avatar Jens Freimann Committed by Christian Borntraeger

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: default avatarCornelia Huck <cornelia.huck@de.ibm.com>
Acked-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: default avatarJens Freimann <jfrei@linux.vnet.ibm.com>
Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
parent 428d53be
...@@ -1354,12 +1354,12 @@ int s390int_to_s390irq(struct kvm_s390_interrupt *s390int, ...@@ -1354,12 +1354,12 @@ int s390int_to_s390irq(struct kvm_s390_interrupt *s390int,
irq->u.stop.flags = s390int->parm; irq->u.stop.flags = s390int->parm;
break; break;
case KVM_S390_INT_EXTERNAL_CALL: case KVM_S390_INT_EXTERNAL_CALL:
if (irq->u.extcall.code & 0xffff0000) if (s390int->parm & 0xffff0000)
return -EINVAL; return -EINVAL;
irq->u.extcall.code = s390int->parm; irq->u.extcall.code = s390int->parm;
break; break;
case KVM_S390_INT_EMERGENCY: case KVM_S390_INT_EMERGENCY:
if (irq->u.emerg.code & 0xffff0000) if (s390int->parm & 0xffff0000)
return -EINVAL; return -EINVAL;
irq->u.emerg.code = s390int->parm; irq->u.emerg.code = s390int->parm;
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment