]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: s390: fix and enforce return code handling for irq injections
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Mon, 25 Mar 2013 16:22:53 +0000 (17:22 +0100)
committerGleb Natapov <gleb@redhat.com>
Tue, 2 Apr 2013 13:14:39 +0000 (16:14 +0300)
commitc365a0cf5c4af2ba0cd89a0b4c593f865ed206d1
treefdd5a066cf77e511e6d28d79e525a6a23638487e
parenta3ebb4a5532aede778ccb53c8f55aeb1f66624df
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>
arch/s390/kvm/intercept.c
arch/s390/kvm/kvm-s390.c
arch/s390/kvm/kvm-s390.h
arch/s390/kvm/priv.c