Skip to contentSkip to conversation

KVM: Fix apic_mmio_write return for unaligned write

PATCH Applied Sheng Yang 2 participants 2 messages Jul 6, 2009

Subsystems (3)
lore
Share & tools
lore

Sheng Yang

author
#0 lore raw

PATCH 1/1 KVM: Fix apic_mmio_write return for unaligned write

Some in-famous OS do unaligned writing for APIC MMIO, and the return value has been missed in recent change, then the OS hangs.

(it's curious that the compilation warning have been ignored...)

---
 arch/x86/kvm/lapic.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kvm/lapic.c +1 -1
index 6f559d6..ccafe0d 100644
@@ -831,7 +831,7 @@ static int apic_mmio_write(struct kvm_io_device *this,
 	if (len != 4 || (offset & 0xf)) {
 		/* Don't shout loud, $infamous_os would cause only noise. */
 		apic_debug("apic write: bad size=%d %lx\n", len, (long)address);
-		return;
+		return 0;
 	}
 
 	val = *(u32*)data;
Signature · 1 line
1.5.4.5
Applied
#1 lore raw
Quoted 4 lines · Sheng Yang

Some in-famous OS do unaligned writing for APIC MMIO, and the return value has been missed in recent change, then the OS hangs.

Applied, thanks.

Quoted 2 lines

(it's curious that the compilation warning have been ignored...)

Yes, need to be more careful.

Signature · 1 line
error compiling committee.c: too many arguments to function