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

Re: [Xen-devel] [PATCH for-4.12] gic-vgic: fix assert condition



Dear Julien,



чт, 24 січ. 2019, 21:27 Julien Grall користувач julien.grall@xxxxxxxxx пише:
(sorry for the formatting)

On Thu, 24 Jan 2019, 18:35 Andrii Anisov, <andrii.anisov@xxxxxxxxx> wrote:
From: Andrii Anisov <andrii_anisov@xxxxxxxx>

Empty commit message should only happen when the title provide enough information.

In that case, you should explain how you hit the assert so the reviewers can understand the change.

It was an extremely rare an totally unusual use-case, which nobody else needs.
I did reboot a guest domain with a device passthroughed to it.



Signed-off-by: Andrii Anisov <andrii_anisov@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 48922f5..684f2d1 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, storuct vcpu *v, unsigned int virq,
     int ret = 0;

     /* "desc" is optional when we disconnect an IRQ. */
-    ASSERT(connect && desc);
+    ASSERT(connect || desc);

This looks wrong to me. Now you allow desc to be NULL when connecting an IRQ.
Yes, sure, the original check is much better: it doesn't allow disconnecting at all.

This does not even match the comment above.
Being upset I mistakingly set another wrong condition. Stefan instead suggested the right one.

Sent from my Android.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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