|
From: | Stefan Weil |
Subject: | Re: [Qemu-devel] [PATCH 1.1 1/2] kvm/apic: correct short memset |
Date: | Sun, 10 Jun 2012 22:29:24 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20120506 Iceowl/1.0b1 Icedove/3.0.11 |
Am 23.05.2012 12:33, schrieb Jan Kiszka:
On 2012-05-22 17:30, Stefan Weil wrote:Am 10.05.2012 19:28, schrieb Jan Kiszka:On 2012-05-10 13:19, Jim Meyering wrote:From: Jim Meyering<address@hidden> kvm_put_apic_state's attempt to clear *kapic before setting its bits cleared sizeof(void*) bytes (no more than 8) rather than the intended 1024 (KVM_APIC_REG_SIZE) bytes. Spotted by coverity. Signed-off-by: Jim Meyering<address@hidden> --- hw/kvm/apic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/kvm/apic.c b/hw/kvm/apic.c index ffe7a52..a0ab503 100644 --- a/hw/kvm/apic.c +++ b/hw/kvm/apic.c @@ -29,7 +29,7 @@ void kvm_put_apic_state(DeviceState *d, struct kvm_lapic_state *kapic) APICCommonState *s = DO_UPCAST(APICCommonState, busdev.qdev, d); int i; - memset(kapic, 0, sizeof(kapic)); + memset(kapic, 0, sizeof(*kapic)); kvm_apic_set_reg(kapic, 0x2, s->id<< 24); kvm_apic_set_reg(kapic, 0x8, s->tpr); kvm_apic_set_reg(kapic, 0xd, s->log_dest<< 24);Yep, that's what I actually meant... Thanks, JanReviewed-by: Stefan Weil<address@hidden> Hello Anthony, this patch should be committed to QEMU 1.1. I had sent a patch with the same fix 6 days later.Thanks for reminding. Yes, please merge! Jan
Ping? This is one of the bug fixes which is missing in QEMU 1.1, and it is also missing in latest QEMU git master. What can be done to get it committed? Cheers, Stefan W.
[Prev in Thread] | Current Thread | [Next in Thread] |