From: Andrii Anisov Date: Fri, 25 Jan 2019 17:06:02 +0000 (+0200) Subject: xen/arm: gic-vgic: Fix the assert condition in vgic_connect_hw_irq X-Git-Tag: archive/raspbian/4.14.0+80-gd101b417b7-1+rpi1^2~63^2~2602 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=863549158129d326b2e5850f722bfda643264f2b;p=xen.git xen/arm: gic-vgic: Fix the assert condition in vgic_connect_hw_irq Currently, the assert condition in vgic_connect_hw_irq does not correspond to the comment above and result to hit the assertion on HW IRQ disconnection. Fix the condition so it corresponds to the comment and allows IRQ disconnection on debug builds. Fixes: ec2a2f1 ("ARM: VGIC: factor out vgic_connect_hw_irq()") Signed-off-by: Andrii Anisov Suggested-by: Stefan Nuernberger Reviewed-by: Andre Przywara [julieng: Reword the commit message] Acked-by: Julien Grall Release-acked-by: Juergen Gross --- diff --git a/xen/arch/arm/gic-vgic.c b/xen/arch/arm/gic-vgic.c index 48922f5595..a3bba854da 100644 --- a/xen/arch/arm/gic-vgic.c +++ b/xen/arch/arm/gic-vgic.c @@ -443,7 +443,7 @@ int vgic_connect_hw_irq(struct domain *d, struct vcpu *v, unsigned int virq, int ret = 0; /* "desc" is optional when we disconnect an IRQ. */ - ASSERT(connect && desc); + ASSERT(!connect || desc); /* We are taking to rank lock to prevent parallel connections. */ vgic_lock_rank(v_target, rank, flags);