• Paul Mackerras's avatar
    KVM: PPC: Book3S: Don't crash if irqfd used with no in-kernel XICS emulation · e48ba1cb
    Paul Mackerras authored
    It turns out that if userspace creates a pseries-type VM without
    in-kernel XICS (interrupt controller) emulation, and then connects
    an eventfd to the VM as an irqfd, and the eventfd gets signalled,
    that the code will try to deliver an interrupt via the non-existent
    XICS object and crash the host kernel with a NULL pointer dereference.
    
    To fix this, we check for the presence of the XICS object before
    trying to deliver the interrupt, and return with an error if not.
    Signed-off-by: default avatarPaul Mackerras <paulus@ozlabs.org>
    e48ba1cb
book3s_xics.c 34.8 KB