IOMMU: correct parsing of "quarantine=scratch-page"
authorJan Beulich <jbeulich@suse.com>
Tue, 13 Jul 2021 08:16:18 +0000 (10:16 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 13 Jul 2021 08:16:18 +0000 (10:16 +0200)
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>
xen/drivers/passthrough/iommu.c

index ab2ae61b11cac7f69a09822edecd5ca30ed61800..fd2578d30a95e1e2ea3c8c3e18100cd6176271ad 100644 (file)
@@ -82,7 +82,7 @@ static int __init parse_iommu_param(const char *s)
 #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