diff options
author | Jens Freimann <jfrei@linux.vnet.ibm.com> | 2015-01-15 08:40:34 -0500 |
---|---|---|
committer | Christian Borntraeger <borntraeger@de.ibm.com> | 2015-01-23 07:25:42 -0500 |
commit | 94d1f564adb9937d71a9509d4e1b64f073ea07ab (patch) | |
tree | 444b949852b0715c70956310c994a2eaed0ed07f /arch/s390/kvm | |
parent | 428d53be5e7468769d4e7899cca06ed5f783a6e1 (diff) |
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 <cornelia.huck@de.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'arch/s390/kvm')
-rw-r--r-- | arch/s390/kvm/interrupt.c | 4 |
1 files changed, 2 insertions, 2 deletions
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, | |||
1354 | irq->u.stop.flags = s390int->parm; | 1354 | irq->u.stop.flags = s390int->parm; |
1355 | break; | 1355 | break; |
1356 | case KVM_S390_INT_EXTERNAL_CALL: | 1356 | case KVM_S390_INT_EXTERNAL_CALL: |
1357 | if (irq->u.extcall.code & 0xffff0000) | 1357 | if (s390int->parm & 0xffff0000) |
1358 | return -EINVAL; | 1358 | return -EINVAL; |
1359 | irq->u.extcall.code = s390int->parm; | 1359 | irq->u.extcall.code = s390int->parm; |
1360 | break; | 1360 | break; |
1361 | case KVM_S390_INT_EMERGENCY: | 1361 | case KVM_S390_INT_EMERGENCY: |
1362 | if (irq->u.emerg.code & 0xffff0000) | 1362 | if (s390int->parm & 0xffff0000) |
1363 | return -EINVAL; | 1363 | return -EINVAL; |
1364 | irq->u.emerg.code = s390int->parm; | 1364 | irq->u.emerg.code = s390int->parm; |
1365 | break; | 1365 | break; |