All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen: Remove unnecessary BUG_ON from __unbind_from_irq()
@ 2018-06-21 17:29 Boris Ostrovsky
  2018-06-22  5:59 ` Juergen Gross
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Boris Ostrovsky @ 2018-06-21 17:29 UTC (permalink / raw)
  To: xen-devel, linux-kernel
  Cc: jgross, ben.hutchings, roger.pau, Boris Ostrovsky, stable

Commit 910f8befdf5b ("xen/pirq: fix error path cleanup when binding
MSIs") fixed a couple of errors in error cleanup path of
xen_bind_pirq_msi_to_irq(). This cleanup allowed a call to
__unbind_from_irq() with an unbound irq, which would result in
triggering the BUG_ON there.

Since there is really no reason for the BUG_ON (xen_free_irq() can
operate on unbound irqs) we can remove it.

Reported-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: stable@vger.kernel.org
---
 drivers/xen/events/events_base.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/xen/events/events_base.c b/drivers/xen/events/events_base.c
index 762378f..08e4af0 100644
--- a/drivers/xen/events/events_base.c
+++ b/drivers/xen/events/events_base.c
@@ -628,8 +628,6 @@ static void __unbind_from_irq(unsigned int irq)
 		xen_irq_info_cleanup(info);
 	}
 
-	BUG_ON(info_for_irq(irq)->type == IRQT_UNBOUND);
-
 	xen_free_irq(irq);
 }
 
-- 
1.8.3.1


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

* Re: [PATCH] xen: Remove unnecessary BUG_ON from __unbind_from_irq()
  2018-06-21 17:29 [PATCH] xen: Remove unnecessary BUG_ON from __unbind_from_irq() Boris Ostrovsky
@ 2018-06-22  5:59 ` Juergen Gross
  2018-06-22  5:59 ` Juergen Gross
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Juergen Gross @ 2018-06-22  5:59 UTC (permalink / raw)
  To: Boris Ostrovsky, xen-devel, linux-kernel; +Cc: ben.hutchings, roger.pau, stable

On 21/06/18 19:29, Boris Ostrovsky wrote:
> Commit 910f8befdf5b ("xen/pirq: fix error path cleanup when binding
> MSIs") fixed a couple of errors in error cleanup path of
> xen_bind_pirq_msi_to_irq(). This cleanup allowed a call to
> __unbind_from_irq() with an unbound irq, which would result in
> triggering the BUG_ON there.
> 
> Since there is really no reason for the BUG_ON (xen_free_irq() can
> operate on unbound irqs) we can remove it.
> 
> Reported-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> Cc: stable@vger.kernel.org

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


Juergen

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

* Re: [PATCH] xen: Remove unnecessary BUG_ON from __unbind_from_irq()
  2018-06-21 17:29 [PATCH] xen: Remove unnecessary BUG_ON from __unbind_from_irq() Boris Ostrovsky
  2018-06-22  5:59 ` Juergen Gross
@ 2018-06-22  5:59 ` Juergen Gross
  2018-06-22  6:34 ` Juergen Gross
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Juergen Gross @ 2018-06-22  5:59 UTC (permalink / raw)
  To: Boris Ostrovsky, xen-devel, linux-kernel; +Cc: ben.hutchings, stable, roger.pau

On 21/06/18 19:29, Boris Ostrovsky wrote:
> Commit 910f8befdf5b ("xen/pirq: fix error path cleanup when binding
> MSIs") fixed a couple of errors in error cleanup path of
> xen_bind_pirq_msi_to_irq(). This cleanup allowed a call to
> __unbind_from_irq() with an unbound irq, which would result in
> triggering the BUG_ON there.
> 
> Since there is really no reason for the BUG_ON (xen_free_irq() can
> operate on unbound irqs) we can remove it.
> 
> Reported-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> Cc: stable@vger.kernel.org

Reviewed-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] 9+ messages in thread

* Re: [PATCH] xen: Remove unnecessary BUG_ON from __unbind_from_irq()
  2018-06-21 17:29 [PATCH] xen: Remove unnecessary BUG_ON from __unbind_from_irq() Boris Ostrovsky
  2018-06-22  5:59 ` Juergen Gross
  2018-06-22  5:59 ` Juergen Gross
@ 2018-06-22  6:34 ` Juergen Gross
  2018-06-22  6:34 ` Juergen Gross
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Juergen Gross @ 2018-06-22  6:34 UTC (permalink / raw)
  To: Boris Ostrovsky, xen-devel, linux-kernel; +Cc: ben.hutchings, roger.pau, stable

On 21/06/18 19:29, Boris Ostrovsky wrote:
> Commit 910f8befdf5b ("xen/pirq: fix error path cleanup when binding
> MSIs") fixed a couple of errors in error cleanup path of
> xen_bind_pirq_msi_to_irq(). This cleanup allowed a call to
> __unbind_from_irq() with an unbound irq, which would result in
> triggering the BUG_ON there.
> 
> Since there is really no reason for the BUG_ON (xen_free_irq() can
> operate on unbound irqs) we can remove it.
> 
> Reported-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> Cc: stable@vger.kernel.org

Pushed to xen/tip.git for-linus-4.18


Juergen

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

* Re: [PATCH] xen: Remove unnecessary BUG_ON from __unbind_from_irq()
  2018-06-21 17:29 [PATCH] xen: Remove unnecessary BUG_ON from __unbind_from_irq() Boris Ostrovsky
                   ` (2 preceding siblings ...)
  2018-06-22  6:34 ` Juergen Gross
@ 2018-06-22  6:34 ` Juergen Gross
  2018-06-22  7:09 ` Roger Pau Monné
  2018-06-22  7:09   ` Roger Pau Monné
  5 siblings, 0 replies; 9+ messages in thread
From: Juergen Gross @ 2018-06-22  6:34 UTC (permalink / raw)
  To: Boris Ostrovsky, xen-devel, linux-kernel; +Cc: ben.hutchings, stable, roger.pau

On 21/06/18 19:29, Boris Ostrovsky wrote:
> Commit 910f8befdf5b ("xen/pirq: fix error path cleanup when binding
> MSIs") fixed a couple of errors in error cleanup path of
> xen_bind_pirq_msi_to_irq(). This cleanup allowed a call to
> __unbind_from_irq() with an unbound irq, which would result in
> triggering the BUG_ON there.
> 
> Since there is really no reason for the BUG_ON (xen_free_irq() can
> operate on unbound irqs) we can remove it.
> 
> Reported-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> Cc: stable@vger.kernel.org

Pushed to xen/tip.git for-linus-4.18


Juergen

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

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

* Re: [PATCH] xen: Remove unnecessary BUG_ON from __unbind_from_irq()
  2018-06-21 17:29 [PATCH] xen: Remove unnecessary BUG_ON from __unbind_from_irq() Boris Ostrovsky
@ 2018-06-22  7:09   ` Roger Pau Monné
  2018-06-22  5:59 ` Juergen Gross
                     ` (4 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Roger Pau Monné @ 2018-06-22  7:09 UTC (permalink / raw)
  To: Boris Ostrovsky; +Cc: xen-devel, linux-kernel, jgross, ben.hutchings, stable

On Thu, Jun 21, 2018 at 01:29:44PM -0400, Boris Ostrovsky wrote:
> Commit 910f8befdf5b ("xen/pirq: fix error path cleanup when binding
> MSIs") fixed a couple of errors in error cleanup path of
> xen_bind_pirq_msi_to_irq(). This cleanup allowed a call to
> __unbind_from_irq() with an unbound irq, which would result in
> triggering the BUG_ON there.
> 
> Since there is really no reason for the BUG_ON (xen_free_irq() can
> operate on unbound irqs) we can remove it.
> 
> Reported-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>

Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>

Thanks, I had this on my queue of TODOs.

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

* Re: [PATCH] xen: Remove unnecessary BUG_ON from __unbind_from_irq()
@ 2018-06-22  7:09   ` Roger Pau Monné
  0 siblings, 0 replies; 9+ messages in thread
From: Roger Pau Monné @ 2018-06-22  7:09 UTC (permalink / raw)
  To: Boris Ostrovsky; +Cc: xen-devel, linux-kernel, jgross, ben.hutchings, stable

On Thu, Jun 21, 2018 at 01:29:44PM -0400, Boris Ostrovsky wrote:
> Commit 910f8befdf5b ("xen/pirq: fix error path cleanup when binding
> MSIs") fixed a couple of errors in error cleanup path of
> xen_bind_pirq_msi_to_irq(). This cleanup allowed a call to
> __unbind_from_irq() with an unbound irq, which would result in
> triggering the BUG_ON there.
> 
> Since there is really no reason for the BUG_ON (xen_free_irq() can
> operate on unbound irqs) we can remove it.
> 
> Reported-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>

Reviewed-by: Roger Pau Monn� <roger.pau@citrix.com>

Thanks, I had this on my queue of TODOs.

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

* Re: [PATCH] xen: Remove unnecessary BUG_ON from __unbind_from_irq()
  2018-06-21 17:29 [PATCH] xen: Remove unnecessary BUG_ON from __unbind_from_irq() Boris Ostrovsky
                   ` (3 preceding siblings ...)
  2018-06-22  6:34 ` Juergen Gross
@ 2018-06-22  7:09 ` Roger Pau Monné
  2018-06-22  7:09   ` Roger Pau Monné
  5 siblings, 0 replies; 9+ messages in thread
From: Roger Pau Monné @ 2018-06-22  7:09 UTC (permalink / raw)
  To: Boris Ostrovsky; +Cc: jgross, xen-devel, ben.hutchings, linux-kernel, stable

On Thu, Jun 21, 2018 at 01:29:44PM -0400, Boris Ostrovsky wrote:
> Commit 910f8befdf5b ("xen/pirq: fix error path cleanup when binding
> MSIs") fixed a couple of errors in error cleanup path of
> xen_bind_pirq_msi_to_irq(). This cleanup allowed a call to
> __unbind_from_irq() with an unbound irq, which would result in
> triggering the BUG_ON there.
> 
> Since there is really no reason for the BUG_ON (xen_free_irq() can
> operate on unbound irqs) we can remove it.
> 
> Reported-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>

Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>

Thanks, I had this on my queue of TODOs.

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

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

* [PATCH] xen: Remove unnecessary BUG_ON from __unbind_from_irq()
@ 2018-06-21 17:29 Boris Ostrovsky
  0 siblings, 0 replies; 9+ messages in thread
From: Boris Ostrovsky @ 2018-06-21 17:29 UTC (permalink / raw)
  To: xen-devel, linux-kernel
  Cc: jgross, ben.hutchings, Boris Ostrovsky, stable, roger.pau

Commit 910f8befdf5b ("xen/pirq: fix error path cleanup when binding
MSIs") fixed a couple of errors in error cleanup path of
xen_bind_pirq_msi_to_irq(). This cleanup allowed a call to
__unbind_from_irq() with an unbound irq, which would result in
triggering the BUG_ON there.

Since there is really no reason for the BUG_ON (xen_free_irq() can
operate on unbound irqs) we can remove it.

Reported-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: stable@vger.kernel.org
---
 drivers/xen/events/events_base.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/xen/events/events_base.c b/drivers/xen/events/events_base.c
index 762378f..08e4af0 100644
--- a/drivers/xen/events/events_base.c
+++ b/drivers/xen/events/events_base.c
@@ -628,8 +628,6 @@ static void __unbind_from_irq(unsigned int irq)
 		xen_irq_info_cleanup(info);
 	}
 
-	BUG_ON(info_for_irq(irq)->type == IRQT_UNBOUND);
-
 	xen_free_irq(irq);
 }
 
-- 
1.8.3.1


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

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

end of thread, other threads:[~2018-06-22  7:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-21 17:29 [PATCH] xen: Remove unnecessary BUG_ON from __unbind_from_irq() Boris Ostrovsky
2018-06-22  5:59 ` Juergen Gross
2018-06-22  5:59 ` Juergen Gross
2018-06-22  6:34 ` Juergen Gross
2018-06-22  6:34 ` Juergen Gross
2018-06-22  7:09 ` Roger Pau Monné
2018-06-22  7:09 ` Roger Pau Monné
2018-06-22  7:09   ` Roger Pau Monné
  -- strict thread matches above, loose matches on Subject: below --
2018-06-21 17:29 Boris Ostrovsky

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.