Skip to contentSkip to conversation

iommu/arm: add missing return

PATCH In review Andrii Anisov 2 participants 4 messages May 30, 2019 – Jun 11, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iommu/arm: add missing return

From: Oleksandr Tyshchenko <[email protected]>

In case iommu_ops have been already set, we should not update it.

---

This patch is extracted from [1], as agreed here [2].

[1] https://lists.xenproject.org/archives/html/xen-devel/2019-01/msg01658.html
[2] https://lists.xenproject.org/archives/html/xen-devel/2019-01/msg01859.html

---
 xen/drivers/passthrough/arm/iommu.c | 3 +++
 1 file changed, 3 insertions(+)
xen/drivers/passthrough/arm/iommu.c +3 -0
index 325997b..2135233 100644
@@ -32,7 +32,10 @@ void __init iommu_set_ops(const struct iommu_ops *ops)
     BUG_ON(ops == NULL);
 
     if ( iommu_ops && iommu_ops != ops )
+    {
         printk("WARNING: Cannot set IOMMU ops, already set to a different value\n");
+        return;
+    }
 
     iommu_ops = ops;
 }
Signature · 7 lines
2.7.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Acked-by on v1 1/1
#1 lore raw

Hi Andrii,

Sorry for the late answer.

Quoted 6 lines · Andrii Anisov

From: Oleksandr Tyshchenko <[email protected]>

In case iommu_ops have been already set, we should not update it.

Cheers,

Quoted 27 lines

---

This patch is extracted from [1], as agreed here [2].

[1] https://lists.xenproject.org/archives/html/xen-devel/2019-01/msg01658.html
[2] https://lists.xenproject.org/archives/html/xen-devel/2019-01/msg01859.html

---
  xen/drivers/passthrough/arm/iommu.c | 3 +++
  1 file changed, 3 insertions(+)
xen/drivers/passthrough/arm/iommu.c +3 -0
index 325997b..2135233 100644
@@ -32,7 +32,10 @@ void __init iommu_set_ops(const struct iommu_ops *ops)
      BUG_ON(ops == NULL);
 
      if ( iommu_ops && iommu_ops != ops )
+    {
          printk("WARNING: Cannot set IOMMU ops, already set to a different value\n");
+        return;
+    }
 
      iommu_ops = ops;
  }
Signature · 6 lines
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#2 lore raw
Quoted 5 lines · Julien Grall

Hi Andrii,

Sorry for the late answer.

On 5/30/19 1:02 PM, Andrii Anisov wrote:

Quoted 8 lines
Quoted 6 lines

From: Oleksandr Tyshchenko <[email protected]>

In case iommu_ops have been already set, we should not update it.

Now committed, thank you!

Cheers,

Signature · 6 lines
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#3 lore raw
Quoted 3 lines · Julien Grall
Quoted 1 line

Now committed, thank you!

Thank you.

Signature · 7 lines
Sincerely,
Andrii Anisov.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel