diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2013-03-25 20:22:53 +0400 |
---|---|---|
committer | Gleb Natapov <gleb@redhat.com> | 2013-04-02 17:14:39 +0400 |
commit | db4a29cb6ac7b2fda505923bdbc58fc35a719f62 (patch) | |
tree | fdd5a066cf77e511e6d28d79e525a6a23638487e /arch/s390/kvm/kvm-s390.c | |
parent | 3736b874a39a1df2a94186c357aabeb6a7d7d4f6 (diff) | |
download | linux-db4a29cb6ac7b2fda505923bdbc58fc35a719f62.tar.xz |
KVM: s390: fix and enforce return code handling for irq injections
kvm_s390_inject_program_int() and friends may fail if no memory is available.
This must be reported to the calling functions, so that this gets passed
down to user space which should fix the situation.
Alternatively we end up with guest state corruption.
So fix this and enforce return value checking by adding a __must_check
annotation to all of these function prototypes.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Diffstat (limited to 'arch/s390/kvm/kvm-s390.c')
-rw-r--r-- | arch/s390/kvm/kvm-s390.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index f241e3315ebb..d05a59c1eea7 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c @@ -633,8 +633,7 @@ static int __vcpu_run(struct kvm_vcpu *vcpu) } else { VCPU_EVENT(vcpu, 3, "%s", "fault in sie instruction"); trace_kvm_s390_sie_fault(vcpu); - kvm_s390_inject_program_int(vcpu, PGM_ADDRESSING); - rc = 0; + rc = kvm_s390_inject_program_int(vcpu, PGM_ADDRESSING); } } VCPU_EVENT(vcpu, 6, "exit sie icptcode %d", |