[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen staging] xen/arm: gic-vgic: Fix the assert condition in vgic_connect_hw_irq



commit 863549158129d326b2e5850f722bfda643264f2b
Author:     Andrii Anisov <andrii_anisov@xxxxxxxx>
AuthorDate: Fri Jan 25 19:06:02 2019 +0200
Commit:     Julien Grall <julien.grall@xxxxxxx>
CommitDate: Tue Jan 29 15:32:42 2019 +0000

    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 <andrii_anisov@xxxxxxxx>
    Suggested-by: Stefan Nuernberger <snu@xxxxxxxxx>
    Reviewed-by: Andre Przywara <andre.przywara@xxxxxxx>
    [julieng: Reword the commit message]
    Acked-by: Julien Grall <julien.grall@xxxxxxx>
    Release-acked-by: Juergen Gross <jgross@xxxxxxxx>
---
 xen/arch/arm/gic-vgic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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);
--
generated by git-patchbot for /home/xen/git/xen.git#staging

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.