irq__routing_init() can fail while allocating entries for the default routing table. gic__init_gic() currently ignores that error and continues with a partially populated table. Return the error before the VGIC is marked as initialised. Signed-off-by: Sascha Bischoff --- arm64/gic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arm64/gic.c b/arm64/gic.c index 1e400962..debb0381 100644 --- a/arm64/gic.c +++ b/arm64/gic.c @@ -344,7 +344,9 @@ static int gic__init_gic(struct kvm *kvm) } } - irq__routing_init(kvm); + ret = irq__routing_init(kvm); + if (ret) + return ret; if (!ioctl(gic_fd, KVM_HAS_DEVICE_ATTR, &vgic_init_attr)) { ret = ioctl(gic_fd, KVM_SET_DEVICE_ATTR, &vgic_init_attr); -- 2.34.1