KVM: s390: check cpu_id prior to using it
authorCarsten Otte <cotte@de.ibm.com>
Tue, 18 Oct 2011 10:27:12 +0000 (12:27 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 7 Nov 2011 21:47:29 +0000 (13:47 -0800)
commit435c060e0a33919163b5757149de4be5cb211d5a
tree1d2366395d4e830f220942c0cde74c84a4ba64a7
parentb4ee8df8fdacee45c32b2feba6af0ba9493f175d
KVM: s390: check cpu_id prior to using it

commit 4d47555a80495657161a7e71ec3014ff2021e450 upstream.

We use the cpu id provided by userspace as array index here. Thus we
clearly need to check it first. Ooops.

Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/s390/kvm/kvm-s390.c