arm/arm64: KVM: Fix set_clear_sgi_pend_reg offset
authorChristoffer Dall <christoffer.dall@linaro.org>
Thu, 25 Sep 2014 16:41:07 +0000 (18:41 +0200)
committerChristoffer Dall <christoffer.dall@linaro.org>
Thu, 2 Oct 2014 15:19:24 +0000 (17:19 +0200)
commitb6c20297368fc6c782c0e5709f0d261bfdee2f6e
treeb2eafe11db55d59ba87af2d28c943403f984bbb2
parente1fde0a1e746c70d026c1388c9d1c0bce278ae01
arm/arm64: KVM: Fix set_clear_sgi_pend_reg offset

The sgi values calculated in read_set_clear_sgi_pend_reg() and
write_set_clear_sgi_pend_reg() were horribly incorrectly multiplied by 4
with catastrophic results in that subfunctions ended up overwriting
memory not allocated for the expected purpose.

This showed up as bugs in kfree() and the kernel complaining a lot of
you turn on memory debugging.

This addresses: http://marc.info/?l=kvm&m=141164910007868&w=2

Reported-by: Shannon Zhao <zhaoshenglong@huawei.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
(cherry picked from commit 0fea6d7628ed6e25a9ee1b67edf7c859718d39e8)
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
virt/kvm/arm/vgic.c