Author: kib
Date: Fri Apr 14 15:16:41 2017
New Revision: 316851
URL: https://svnweb.freebsd.org/changeset/base/316851

Log:
  Correct calculation of the entry->free_down in the invariants-checking
  code.
  
  Reported by:  maxim
  Found by:     PVS studio scan
  Sponsored by: The FreeBSD Foundation
  MFC after:    1 week

Modified:
  head/sys/x86/iommu/intel_gas.c

Modified: head/sys/x86/iommu/intel_gas.c
==============================================================================
--- head/sys/x86/iommu/intel_gas.c      Fri Apr 14 15:09:30 2017        
(r316850)
+++ head/sys/x86/iommu/intel_gas.c      Fri Apr 14 15:16:41 2017        
(r316851)
@@ -198,7 +198,7 @@ dmar_gas_check_free(struct dmar_domain *
                            l->free_down));
                } else {
                        v = MAX(entry->free_after, l->free_down);
-                       v = MAX(entry->free_down, r->free_down);
+                       v = MAX(v, r->free_down);
                        MPASS(entry->free_down == v);
                }
        }
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to