diff mbox series

[1/2] IOMMU: correct parsing of "quarantine=scratch-page"

Message ID dd85d77a-34c4-dbdf-1822-28612fe9f7ac@suse.com (mailing list archive)
State New
Headers show
Series IOMMU: adjustments after ""IOMMU: make DMA containment of quarantined devices optional"" | expand

Commit Message

Jan Beulich July 7, 2021, 1:21 p.m. UTC
During the multiple renames of the sub-option I apparently forgot to
update the left side of the &&, and this pretty consistently.

Fixes: 980d6acf1517 ("IOMMU: make DMA containment of quarantined devices optional")

Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>

Comments

Paul Durrant July 12, 2021, 6:34 p.m. UTC | #1
On 07/07/2021 14:21, Jan Beulich wrote:
> During the multiple renames of the sub-option I apparently forgot to
> update the left side of the &&, and this pretty consistently.
> 
> Fixes: 980d6acf1517 ("IOMMU: make DMA containment of quarantined devices optional")
> 
> Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: Paul Durrant <paul@xen.org>

> 
> --- a/xen/drivers/passthrough/iommu.c
> +++ b/xen/drivers/passthrough/iommu.c
> @@ -82,7 +82,7 @@ static int __init parse_iommu_param(cons
>   #ifdef CONFIG_HAS_PCI
>           else if ( (val = parse_boolean("quarantine", s, ss)) >= 0 )
>               iommu_quarantine = val;
> -        else if ( ss == s + 15 && !strncmp(s, "quarantine=scratch-page", 23) )
> +        else if ( ss == s + 23 && !strncmp(s, "quarantine=scratch-page", 23) )
>               iommu_quarantine = IOMMU_quarantine_scratch_page;
>   #endif
>   #ifdef CONFIG_X86
>
diff mbox series

Patch

--- a/xen/drivers/passthrough/iommu.c
+++ b/xen/drivers/passthrough/iommu.c
@@ -82,7 +82,7 @@  static int __init parse_iommu_param(cons
 #ifdef CONFIG_HAS_PCI
         else if ( (val = parse_boolean("quarantine", s, ss)) >= 0 )
             iommu_quarantine = val;
-        else if ( ss == s + 15 && !strncmp(s, "quarantine=scratch-page", 23) )
+        else if ( ss == s + 23 && !strncmp(s, "quarantine=scratch-page", 23) )
             iommu_quarantine = IOMMU_quarantine_scratch_page;
 #endif
 #ifdef CONFIG_X86