From: Ekaterina Tumanova Date: Tue, 3 Mar 2015 08:54:41 +0000 (+0100) Subject: KVM: s390: Zero out current VMDB of STSI before including level3 data. X-Git-Tag: v4.9.8~4520^2~19^2~33 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b75f4c9afac2604feb971441116c07a24ecca1ec;p=platform%2Fkernel%2Flinux-rpi3.git KVM: s390: Zero out current VMDB of STSI before including level3 data. s390 documentation requires words 0 and 10-15 to be reserved and stored as zeros. As we fill out all other fields, we can memset the full structure. Signed-off-by: Ekaterina Tumanova Cc: stable@vger.kernel.org Reviewed-by: David Hildenbrand Signed-off-by: Christian Borntraeger --- diff --git a/arch/s390/kvm/priv.c b/arch/s390/kvm/priv.c index 3511169..c7fee9d 100644 --- a/arch/s390/kvm/priv.c +++ b/arch/s390/kvm/priv.c @@ -467,6 +467,7 @@ static void handle_stsi_3_2_2(struct kvm_vcpu *vcpu, struct sysinfo_3_2_2 *mem) for (n = mem->count - 1; n > 0 ; n--) memcpy(&mem->vm[n], &mem->vm[n - 1], sizeof(mem->vm[0])); + memset(&mem->vm[0], 0, sizeof(mem->vm[0])); mem->vm[0].cpus_total = cpus; mem->vm[0].cpus_configured = cpus; mem->vm[0].cpus_standby = 0;