All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 for-4.12] gic-vgic: fix an assert condition
@ 2019-01-25 17:06 Andrii Anisov
  2019-01-28  9:42 ` Andre Przywara
  2019-01-28 12:04 ` Juergen Gross
  0 siblings, 2 replies; 6+ messages in thread
From: Andrii Anisov @ 2019-01-25 17:06 UTC (permalink / raw)
  To: xen-devel
  Cc: Juergen Gross, Stefano Stabellini, Andrii Anisov, Andre Przywara,
	Stefan Nuernberger, Julien Grall

From: Andrii Anisov <andrii_anisov@epam.com>

Currently, that assert condition does not correspond to a comment above
and makes assertion failed 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@epam.com>
Suggested-by: Stefan Nuernberger <snu@amazon.de>
---
in v2:
 - updated condition as suggested by Stefan
 - provided detailed commit message
 - added Suggested-by from Stefan
 - referred a commit introduced the issue

 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..a3bba85 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);
-- 
2.7.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 for-4.12] gic-vgic: fix an assert condition
  2019-01-25 17:06 [PATCH v2 for-4.12] gic-vgic: fix an assert condition Andrii Anisov
@ 2019-01-28  9:42 ` Andre Przywara
  2019-01-28 10:42   ` Julien Grall
  2019-01-28 12:04 ` Juergen Gross
  1 sibling, 1 reply; 6+ messages in thread
From: Andre Przywara @ 2019-01-28  9:42 UTC (permalink / raw)
  To: Andrii Anisov
  Cc: Juergen Gross, Stefano Stabellini, Andrii Anisov,
	Stefan Nuernberger, Julien Grall, xen-devel

On Fri, 25 Jan 2019 19:06:02 +0200
Andrii Anisov <andrii.anisov@gmail.com> wrote:

> From: Andrii Anisov <andrii_anisov@epam.com>
> 
> Currently, that assert condition does not correspond to a comment
> above and makes assertion failed 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@epam.com>
> Suggested-by: Stefan Nuernberger <snu@amazon.de>

Reviewed-by: Andre Przywara <andre.przywara@arm.com>

Cheers,
Andre.

> ---
> in v2:
>  - updated condition as suggested by Stefan
>  - provided detailed commit message
>  - added Suggested-by from Stefan
>  - referred a commit introduced the issue
> 
>  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..a3bba85 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);


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 for-4.12] gic-vgic: fix an assert condition
  2019-01-28  9:42 ` Andre Przywara
@ 2019-01-28 10:42   ` Julien Grall
  0 siblings, 0 replies; 6+ messages in thread
From: Julien Grall @ 2019-01-28 10:42 UTC (permalink / raw)
  To: Andre Przywara, Andrii Anisov
  Cc: Juergen Gross, xen-devel, Stefano Stabellini, Andrii Anisov,
	Stefan Nuernberger

On 1/28/19 9:42 AM, Andre Przywara wrote:
> On Fri, 25 Jan 2019 19:06:02 +0200
> Andrii Anisov <andrii.anisov@gmail.com> wrote:
> 
>> From: Andrii Anisov <andrii_anisov@epam.com>
>>
>> Currently, that assert condition does not correspond to a comment
>> above and makes assertion failed 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@epam.com>
>> Suggested-by: Stefan Nuernberger <snu@amazon.de>
> 
> Reviewed-by: Andre Przywara <andre.przywara@arm.com>

Acked-by: Julien Grall <julien.grall@arm.com>

Juergen, can we get a release-ack for this patch?

Cheers,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 for-4.12] gic-vgic: fix an assert condition
  2019-01-25 17:06 [PATCH v2 for-4.12] gic-vgic: fix an assert condition Andrii Anisov
  2019-01-28  9:42 ` Andre Przywara
@ 2019-01-28 12:04 ` Juergen Gross
  2019-01-29 15:34   ` Julien Grall
  1 sibling, 1 reply; 6+ messages in thread
From: Juergen Gross @ 2019-01-28 12:04 UTC (permalink / raw)
  To: Andrii Anisov, xen-devel
  Cc: Andre Przywara, Julien Grall, Stefano Stabellini, Andrii Anisov,
	Stefan Nuernberger

On 25/01/2019 18:06, Andrii Anisov wrote:
> From: Andrii Anisov <andrii_anisov@epam.com>
> 
> Currently, that assert condition does not correspond to a comment above
> and makes assertion failed 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@epam.com>
> Suggested-by: Stefan Nuernberger <snu@amazon.de>

Release-acked-by: Juergen Gross <jgross@suse.com>


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 for-4.12] gic-vgic: fix an assert condition
  2019-01-28 12:04 ` Juergen Gross
@ 2019-01-29 15:34   ` Julien Grall
  2019-01-29 16:06     ` Andrii Anisov
  0 siblings, 1 reply; 6+ messages in thread
From: Julien Grall @ 2019-01-29 15:34 UTC (permalink / raw)
  To: Juergen Gross, Andrii Anisov, xen-devel
  Cc: Andre Przywara, Stefano Stabellini, Andrii Anisov, Stefan Nuernberger

Hi,

On 28/01/2019 12:04, Juergen Gross wrote:
> On 25/01/2019 18:06, Andrii Anisov wrote:
>> From: Andrii Anisov <andrii_anisov@epam.com>
>>
>> Currently, that assert condition does not correspond to a comment above
>> and makes assertion failed 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@epam.com>
>> Suggested-by: Stefan Nuernberger <snu@amazon.de>
> 
> Release-acked-by: Juergen Gross <jgross@suse.com>

Thank you!

I have now applied the patch with a slight reword in the commit message:

xen/arm: gic-vgic: fix 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.

Andrii, please try to add the subsystem you modify in the commit title (i.e 
xen/arm). This helps for the reviewer to know what you are modifying and also 
helps when looking at shortlog.

Cheers,

> 
> 
> Juergen
> 

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 for-4.12] gic-vgic: fix an assert condition
  2019-01-29 15:34   ` Julien Grall
@ 2019-01-29 16:06     ` Andrii Anisov
  0 siblings, 0 replies; 6+ messages in thread
From: Andrii Anisov @ 2019-01-29 16:06 UTC (permalink / raw)
  To: Julien Grall, Juergen Gross, xen-devel
  Cc: Andre Przywara, Stefano Stabellini, Andrii Anisov, Stefan Nuernberger



On 29.01.19 17:34, Julien Grall wrote:
> Andrii, please try to add the subsystem you modify in the commit title (i.e xen/arm). This helps for the reviewer to know what you are modifying and also helps when looking at shortlog.
Oh, I missed "arm/" this time.
Will try to not miss it further.

-- 
Sincerely,
Andrii Anisov.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-01-29 16:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-25 17:06 [PATCH v2 for-4.12] gic-vgic: fix an assert condition Andrii Anisov
2019-01-28  9:42 ` Andre Przywara
2019-01-28 10:42   ` Julien Grall
2019-01-28 12:04 ` Juergen Gross
2019-01-29 15:34   ` Julien Grall
2019-01-29 16:06     ` Andrii Anisov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.