kernel-fxtec-pro1x/virt/kvm
Julia Lawall 6223011fb9 KVM: correct error-handling code
This code is not executed before file has been initialized to the result of
calling eventfd_fget.  This function returns an ERR_PTR value in an error
case instead of NULL.  Thus the test that file is not NULL is always true.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@match exists@
expression x, E;
statement S1, S2;
@@

x = eventfd_fget(...)
... when != x = E
(
*  if (x == NULL || ...) S1 else S2
|
*  if (x == NULL && ...) S1 else S2
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Avi Kivity <avi@redhat.com>
2009-09-10 18:11:12 +03:00
..
coalesced_mmio.c KVM: make io_bus interface more robust 2009-09-10 08:33:12 +03:00
coalesced_mmio.h KVM: move coalesced_mmio locking to its own device 2009-09-10 08:32:49 +03:00
eventfd.c KVM: correct error-handling code 2009-09-10 18:11:12 +03:00
ioapic.c KVM: Fix coalesced interrupt reporting in IOAPIC 2009-09-10 10:46:59 +03:00
ioapic.h
iodev.h KVM: remove in_range from io devices 2009-09-10 08:33:05 +03:00
iommu.c
irq_comm.c KVM: Add trace points in irqchip code 2009-09-10 08:33:11 +03:00
Kconfig KVM: Break dependency between vcpu index in vcpus array and vcpu_id. 2009-09-10 08:32:52 +03:00
kvm_main.c KVM: fix compile warnings on s390 2009-09-10 18:11:11 +03:00