KVM: s390: avoid memory overwrites on emergency signal injection
KVM: s390: avoid memory overwrites on emergency signal injection

Commit 383d0b050106 ("KVM: s390: handle pending local interrupts via
bitmap") introduced a possible memory overwrite from user space.

User space could pass an invalid emergency signal code (sending VCPU)
and therefore exceed the bitmap. Let's take care of this case and
check that the id is in the valid range.

Reviewed-by: Dominik Dingel <d1e5197fc3340c52389f7f33900df40c6bf98e12@linux.vnet.ibm.com>
Cc: 4fbacc2fa0ffdbb11bf1ad6925b886ebd08dd15f@vger.kernel.org # v3.19+ db27a7a KVM: Provide function for VCPU lookup by id
Signed-off-by: David Hildenbrand <ae115cfa58aaa81618f054056f573d0d78c5ed09@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <49712f635b03c16d7f4c43df70e49ec8c565813d@de.ibm.com>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs