Skip to contentSkip to conversation

Revert "irqbypass: do not start cons/prod when failed connect"

PATCH Applied Zhu Lingshan 7 participants 15 messages May 8, 2021 – May 11, 2021

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Revert "irqbypass: do not start cons/prod when failed connect"

This reverts commit a979a6aa009f3c99689432e0cdb5402a4463fb88.

The reverted commit may cause VM freeze on arm64 platform. Because on arm64 platform, stop a consumer will suspend the VM, the VM will freeze without a start consumer

---
 virt/lib/irqbypass.c | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)
virt/lib/irqbypass.c +6 -10
index c9bb3957f58a..28fda42e471b 100644
@@ -40,21 +40,17 @@ static int __connect(struct irq_bypass_producer *prod,
 	if (prod->add_consumer)
 		ret = prod->add_consumer(prod, cons);
 
-	if (ret)
-		goto err_add_consumer;
-
-	ret = cons->add_producer(cons, prod);
-	if (ret)
-		goto err_add_producer;
+	if (!ret) {
+		ret = cons->add_producer(cons, prod);
+		if (ret && prod->del_consumer)
+			prod->del_consumer(prod, cons);
+	}
 
 	if (cons->start)
 		cons->start(cons);
 	if (prod->start)
 		prod->start(prod);
-err_add_producer:
-	if (prod->del_consumer)
-		prod->del_consumer(prod, cons);
-err_add_consumer:
+
 	return ret;
 }
 
Signature · 1 line
2.27.0
maintainer
#1 lore raw
Quoted 11 lines · Zhu Lingshan

This reverts commit a979a6aa009f3c99689432e0cdb5402a4463fb88.

The reverted commit may cause VM freeze on arm64 platform. Because on arm64 platform, stop a consumer will suspend the VM, the VM will freeze without a start consumer

---
 virt/lib/irqbypass.c | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

<formletter>

This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.

</formletter>

maintainer Acked-by on v1 1/1
#2 lore raw
In reply to Zhu Lingshan
Quoted 6 lines · Zhu Lingshan

This reverts commit a979a6aa009f3c99689432e0cdb5402a4463fb88.

The reverted commit may cause VM freeze on arm64 platform. Because on arm64 platform, stop a consumer will suspend the VM, the VM will freeze without a start consumer

It also unconditionally calls del_consumer on the producer, which isn't exactly expected.

Quoted 2 lines
Fixes a979a6aa009f ("irqbypass: do not start cons/prod when failed connect")

Thanks,

	M.
Signature · 1 line
Without deviation from the norm, progress is not possible.
Reviewed-by
#3 lore raw

Hi,

Quoted 9 lines · Marc Zyngier
Quoted 6 lines · Zhu Lingshan

This reverts commit a979a6aa009f3c99689432e0cdb5402a4463fb88.

The reverted commit may cause VM freeze on arm64 platform. Because on arm64 platform, stop a consumer will suspend the VM, the VM will freeze without a start consumer

Quoted 7 lines

It also unconditionally calls del_consumer on the producer, which isn't exactly expected.

Quoted 2 lines

Thanks

Eric

Quoted 10 lines
Fixes a979a6aa009f ("irqbypass: do not start cons/prod when failed connect")

Thanks,

	M.
Tested-by
#4 lore raw
In reply to Marc Zyngier

Hi Marc,

Quoted 9 lines · Marc Zyngier
Quoted 6 lines · Zhu Lingshan

This reverts commit a979a6aa009f3c99689432e0cdb5402a4463fb88.

The reverted commit may cause VM freeze on arm64 platform. Because on arm64 platform, stop a consumer will suspend the VM, the VM will freeze without a start consumer

Quoted 7 lines

It also unconditionally calls del_consumer on the producer, which isn't exactly expected.

Quoted 2 lines

Thanks for the tag, it works with this patch, So:

I shall invite you to have a drink for the quick debug. Anyway, thank you again.

Shaokun

Quoted 10 lines
Fixes a979a6aa009f ("irqbypass: do not start cons/prod when failed connect")

Thanks,

	M.
maintainer
#5 lore raw
Quoted 19 lines · Shaokun Zhang

Hi Marc,

Quoted 15 lines · Marc Zyngier
Quoted 6 lines · Zhu Lingshan

This reverts commit a979a6aa009f3c99689432e0cdb5402a4463fb88.

The reverted commit may cause VM freeze on arm64 platform. Because on arm64 platform, stop a consumer will suspend the VM, the VM will freeze without a start consumer

It also unconditionally calls del_consumer on the producer, which isn't exactly expected.

Quoted 2 lines
Quoted 7 lines
Quoted 1 line

Thanks for the tag, it works with this patch, So:

I shall invite you to have a drink for the quick debug. Anyway, thank you again.

No worries, glad we were able to root-cause the problem quickly enough.

Thanks,

	M.
Signature · 1 line
Without deviation from the norm, progress is not possible.
Acked-by on v1 1/1
#6 lore raw
In reply to Zhu Lingshan
Quoted 7 lines · Zhu Lingshan

This reverts commit a979a6aa009f3c99689432e0cdb5402a4463fb88.

The reverted commit may cause VM freeze on arm64 platform. Because on arm64 platform, stop a consumer will suspend the VM, the VM will freeze without a start consumer

Please resubmit with the formal process of stable (stable-kernel-rules.rst).

Thanks

Quoted 36 lines
---
  virt/lib/irqbypass.c | 16 ++++++----------
  1 file changed, 6 insertions(+), 10 deletions(-)
virt/lib/irqbypass.c +6 -10
index c9bb3957f58a..28fda42e471b 100644
@@ -40,21 +40,17 @@ static int __connect(struct irq_bypass_producer *prod,
  	if (prod->add_consumer)
  		ret = prod->add_consumer(prod, cons);
 
-	if (ret)
-		goto err_add_consumer;
-
-	ret = cons->add_producer(cons, prod);
-	if (ret)
-		goto err_add_producer;
+	if (!ret) {
+		ret = cons->add_producer(cons, prod);
+		if (ret && prod->del_consumer)
+			prod->del_consumer(prod, cons);
+	}
 
  	if (cons->start)
  		cons->start(cons);
  	if (prod->start)
  		prod->start(prod);
-err_add_producer:
-	if (prod->del_consumer)
-		prod->del_consumer(prod, cons);
-err_add_consumer:
+
  	return ret;
  }
 
#7 lore raw
Quoted 8 lines · Jason Wang
Quoted 6 lines · Zhu Lingshan

This reverts commit a979a6aa009f3c99689432e0cdb5402a4463fb88.

The reverted commit may cause VM freeze on arm64 platform. Because on arm64 platform, stop a consumer will suspend the VM, the VM will freeze without a start consumer

Quoted 6 lines
Quoted 1 line

Please resubmit with the formal process of stable (stable-kernel-rules.rst).

sure, I will re-submit it to stable kernel once it is merged into Linus tree.

Thanks

Quoted 39 lines

Thanks

Quoted 34 lines

---
  virt/lib/irqbypass.c | 16 ++++++----------

  1 file changed, 6 insertions(+), 10 deletions(-)
virt/lib/irqbypass.c +6 -9
index c9bb3957f58a..28fda42e471b 100644
@@ -40,21 +40,17 @@ static int __connect(struct irq_bypass_producer 
 *prod,
       if (prod->add_consumer)
           ret = prod->add_consumer(prod, cons);
   -    if (ret)
-        goto err_add_consumer;
-
-    ret = cons->add_producer(cons, prod);
-    if (ret)
-        goto err_add_producer;
+    if (!ret) {
+        ret = cons->add_producer(cons, prod);
+        if (ret && prod->del_consumer)
+            prod->del_consumer(prod, cons);
+    }
         if (cons->start)
           cons->start(cons);
       if (prod->start)
           prod->start(prod);
-err_add_producer:
-    if (prod->del_consumer)
-        prod->del_consumer(prod, cons);
-err_add_consumer:
+
       return ret;
   }
#8 lore raw
Quoted 14 lines · Lingshan
Quoted 11 lines · Jason Wang
Quoted 7 lines · Zhu Lingshan

This reverts commit a979a6aa009f3c99689432e0cdb5402a4463fb88.

The reverted commit may cause VM freeze on arm64 platform. Because on arm64 platform, stop a consumer will suspend the VM, the VM will freeze without a start consumer

Quoted 6 lines
Quoted 3 lines

Please resubmit with the formal process of stable (stable-kernel-rules.rst).

sure, I will re-submit it to stable kernel once it is merged into Linus tree.

Thanks

I think it's better to resubmit (option 1), see how stable-kernel-rules.rst said:

""

:ref:option_1 is **strongly** preferred, is the easiest and most common. :ref:option_2 and :ref:option_3 are more useful if the patch isn't deemed worthy at the time it is applied to a public git tree (for instance, because it deserves more regression testing first).

"""

Thanks

Quoted 40 lines
Quoted 39 lines

Thanks

Quoted 34 lines

---
  virt/lib/irqbypass.c | 16 ++++++----------

  1 file changed, 6 insertions(+), 10 deletions(-)
virt/lib/irqbypass.c +6 -9
index c9bb3957f58a..28fda42e471b 100644
@@ -40,21 +40,17 @@ static int __connect(struct irq_bypass_producer 
 *prod,
       if (prod->add_consumer)
           ret = prod->add_consumer(prod, cons);
   -    if (ret)
-        goto err_add_consumer;
-
-    ret = cons->add_producer(cons, prod);
-    if (ret)
-        goto err_add_producer;
+    if (!ret) {
+        ret = cons->add_producer(cons, prod);
+        if (ret && prod->del_consumer)
+            prod->del_consumer(prod, cons);
+    }
         if (cons->start)
           cons->start(cons);
       if (prod->start)
           prod->start(prod);
-err_add_producer:
-    if (prod->del_consumer)
-        prod->del_consumer(prod, cons);
-err_add_consumer:
+
       return ret;
   }
#9 lore raw
Quoted 28 lines · Jason Wang
Quoted 14 lines · Lingshan
Quoted 11 lines · Jason Wang
Quoted 7 lines · Zhu Lingshan

This reverts commit a979a6aa009f3c99689432e0cdb5402a4463fb88.

The reverted commit may cause VM freeze on arm64 platform. Because on arm64 platform, stop a consumer will suspend the VM, the VM will freeze without a start consumer

Quoted 6 lines
Quoted 3 lines

Please resubmit with the formal process of stable (stable-kernel-rules.rst).

sure, I will re-submit it to stable kernel once it is merged into Linus tree.

Thanks

I think it's better to resubmit (option 1), see how stable-kernel-rules.rst said:

""

Quoted 8 lines

:ref:option_1 is **strongly** preferred, is the easiest and most common. :ref:option_2 and :ref:option_3 are more useful if the patch isn't deemed worthy at the time it is applied to a public git tree (for instance, because it deserves more regression testing first).

"""

Thanks

OK, works for me, I will add cc stable, and resubmit it soon

Thanks!

Quoted 43 lines
Quoted 42 lines
Quoted 41 lines

Thanks

Quoted 34 lines

---
  virt/lib/irqbypass.c | 16 ++++++----------

  1 file changed, 6 insertions(+), 10 deletions(-)
virt/lib/irqbypass.c +6 -9
index c9bb3957f58a..28fda42e471b 100644
@@ -40,21 +40,17 @@ static int __connect(struct irq_bypass_producer 
 *prod,
       if (prod->add_consumer)
           ret = prod->add_consumer(prod, cons);
   -    if (ret)
-        goto err_add_consumer;
-
-    ret = cons->add_producer(cons, prod);
-    if (ret)
-        goto err_add_producer;
+    if (!ret) {
+        ret = cons->add_producer(cons, prod);
+        if (ret && prod->del_consumer)
+            prod->del_consumer(prod, cons);
+    }
         if (cons->start)
           cons->start(cons);
       if (prod->start)
           prod->start(prod);
-err_add_producer:
-    if (prod->del_consumer)
-        prod->del_consumer(prod, cons);
-err_add_consumer:
+
       return ret;
   }
#10 lore raw
Quoted 36 lines · Lingshan
Quoted 33 lines · Jason Wang
Quoted 14 lines · Lingshan
Quoted 11 lines · Jason Wang
Quoted 7 lines · Zhu Lingshan

This reverts commit a979a6aa009f3c99689432e0cdb5402a4463fb88.

The reverted commit may cause VM freeze on arm64 platform. Because on arm64 platform, stop a consumer will suspend the VM, the VM will freeze without a start consumer

Quoted 6 lines
Quoted 3 lines

Please resubmit with the formal process of stable (stable-kernel-rules.rst).

sure, I will re-submit it to stable kernel once it is merged into Linus tree.

Thanks

I think it's better to resubmit (option 1), see how stable-kernel-rules.rst said:

""

:ref:option_1 is **strongly** preferred, is the easiest and most common. :ref:option_2 and :ref:option_3 are more useful if the patch isn't deemed worthy at the time it is applied to a public git tree (for instance, because it deserves more regression testing first).

Quoted 6 lines
Quoted 3 lines

"""

Thanks

OK, works for me, I will add cc stable, and resubmit it soon

Thanks!

I just seeMarc has already added "Cc: [email protected]", and he would take the patch in his tree, so I think no need to resend.

Thanks,
Zhu Lingshan

Quoted 44 lines
Quoted 43 lines
Quoted 42 lines
Quoted 41 lines

Thanks

Quoted 34 lines

---
  virt/lib/irqbypass.c | 16 ++++++----------

  1 file changed, 6 insertions(+), 10 deletions(-)
virt/lib/irqbypass.c +6 -9
index c9bb3957f58a..28fda42e471b 100644
@@ -40,21 +40,17 @@ static int __connect(struct 
 irq_bypass_producer *prod,
       if (prod->add_consumer)
           ret = prod->add_consumer(prod, cons);
   -    if (ret)
-        goto err_add_consumer;
-
-    ret = cons->add_producer(cons, prod);
-    if (ret)
-        goto err_add_producer;
+    if (!ret) {
+        ret = cons->add_producer(cons, prod);
+        if (ret && prod->del_consumer)
+            prod->del_consumer(prod, cons);
+    }
         if (cons->start)
           cons->start(cons);
       if (prod->start)
           prod->start(prod);
-err_add_producer:
-    if (prod->del_consumer)
-        prod->del_consumer(prod, cons);
-err_add_consumer:
+
       return ret;
   }
maintainer
#11 lore raw
Quoted 46 lines · Lingshan
Quoted 42 lines · Lingshan
Quoted 39 lines · Jason Wang
Quoted 14 lines · Lingshan
Quoted 11 lines · Jason Wang
Quoted 7 lines · Zhu Lingshan

This reverts commit a979a6aa009f3c99689432e0cdb5402a4463fb88.

The reverted commit may cause VM freeze on arm64 platform. Because on arm64 platform, stop a consumer will suspend the VM, the VM will freeze without a start consumer

Quoted 8 lines
Quoted 4 lines

Please resubmit with the formal process of stable
(stable-kernel-rules.rst).

sure, I will re-submit it to stable kernel once it is merged into Linus tree.

Thanks

I think it's better to resubmit (option 1), see how stable-kernel-rules.rst said:

""

:ref:option_1 is **strongly** preferred, is the easiest and most common.
:ref:option_2 and :ref:option_3 are more useful if the patch isn't deemed
worthy at the time it is applied to a public git tree (for instance, because
it deserves more regression testing first).

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

"""

Thanks

OK, works for me, I will add cc stable, and resubmit it soon

Thanks!

I just seeMarc has already added "Cc: [email protected]", and he would take the patch in his tree, so I think no need to resend.

That's fine, I can fix things up myself and queue the fix for -rc2.

Thanks,

	M.
Signature · 1 line
Without deviation from the norm, progress is not possible.
#12 lore raw
Quoted 43 lines · Marc Zyngier
Quoted 41 lines · Lingshan
Quoted 38 lines · Lingshan
Quoted 36 lines · Jason Wang
Quoted 11 lines · Lingshan
Quoted 9 lines · Jason Wang
Quoted 7 lines · Zhu Lingshan

This reverts commit a979a6aa009f3c99689432e0cdb5402a4463fb88.

The reverted commit may cause VM freeze on arm64 platform. Because on arm64 platform, stop a consumer will suspend the VM, the VM will freeze without a start consumer

Quoted 8 lines
Quoted 4 lines

Please resubmit with the formal process of stable
(stable-kernel-rules.rst).

sure, I will re-submit it to stable kernel once it is merged into Linus tree.

Thanks

I think it's better to resubmit (option 1), see how stable-kernel-rules.rst said:

""

:ref:option_1 is **strongly** preferred, is the easiest and most common.
:ref:option_2 and :ref:option_3 are more useful if the patch isn't deemed
worthy at the time it is applied to a public git tree (for instance, because
it deserves more regression testing first).

"""

Quoted 7 lines
Quoted 6 lines
Quoted 4 lines
Quoted 1 line

Thanks

OK, works for me, I will add cc stable, and resubmit it soon

Thanks!

I just seeMarc has already added "Cc: [email protected]", and he would take the patch in his tree, so I think no need to resend.

That's fine, I can fix things up myself and queue the fix for -rc2.

Thanks Marc!

Quoted 5 lines

Thanks,

	M.

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

maintainer Applied
#13 lore raw
In reply to Zhu Lingshan
Quoted 5 lines · Zhu Lingshan

This reverts commit a979a6aa009f3c99689432e0cdb5402a4463fb88.

The reverted commit may cause VM freeze on arm64 platform. Because on arm64 platform, stop a consumer will suspend the VM, the VM will freeze without a start consumer

Applied to fixes, thanks!

[1/1] Revert "irqbypass: do not start cons/prod when failed connect"

      commit: 0b1c0157b7b0d66d2d749ec950c7f8799d4a2e0e

Cheers,

	M.
Signature · 7 lines
Without deviation from the norm, progress is not possible.


_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
Acked-by on v1 1/1
#14 lore raw
In reply to Zhu Lingshan
Quoted 7 lines · Zhu Lingshan

This reverts commit a979a6aa009f3c99689432e0cdb5402a4463fb88.

The reverted commit may cause VM freeze on arm64 platform. Because on arm64 platform, stop a consumer will suspend the VM, the VM will freeze without a start consumer

Quoted 38 lines
---
 virt/lib/irqbypass.c | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)
virt/lib/irqbypass.c +6 -10
index c9bb3957f58a..28fda42e471b 100644
@@ -40,21 +40,17 @@ static int __connect(struct irq_bypass_producer *prod,
 	if (prod->add_consumer)
 		ret = prod->add_consumer(prod, cons);
 
-	if (ret)
-		goto err_add_consumer;
-
-	ret = cons->add_producer(cons, prod);
-	if (ret)
-		goto err_add_producer;
+	if (!ret) {
+		ret = cons->add_producer(cons, prod);
+		if (ret && prod->del_consumer)
+			prod->del_consumer(prod, cons);
+	}
 
 	if (cons->start)
 		cons->start(cons);
 	if (prod->start)
 		prod->start(prod);
-err_add_producer:
-	if (prod->del_consumer)
-		prod->del_consumer(prod, cons);
-err_add_consumer:
+
 	return ret;
 }
 
Signature · 1 line
2.27.0