svn commit: r280195 - head/sys/x86/iommu

Konstantin Belousov kib at FreeBSD.org
Tue Mar 17 21:55:35 UTC 2015


Author: kib
Date: Tue Mar 17 21:55:33 2015
New Revision: 280195
URL: https://svnweb.freebsd.org/changeset/base/280195

Log:
  When inserting new entry into the address map, ensure that not only
  next entry does not intersect with the tail of the new entry, but also
  that previous entry is also before new entry start.
  
  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	Tue Mar 17 21:15:24 2015	(r280194)
+++ head/sys/x86/iommu/intel_gas.c	Tue Mar 17 21:55:33 2015	(r280195)
@@ -366,7 +366,8 @@ dmar_gas_match_insert(struct dmar_gas_ma
 
 	next = RB_NEXT(dmar_gas_entries_tree, &a->ctx->rb_root, prev);
 	KASSERT(next->start >= a->entry->end &&
-	    next->start - a->entry->start >= a->size,
+	    next->start - a->entry->start >= a->size &&
+	    prev->end <= a->entry->end,
 	    ("dmar_gas_match_insert hole failed %p prev (%jx, %jx) "
 	    "free_after %jx next (%jx, %jx) entry (%jx, %jx)", a->ctx,
 	    (uintmax_t)prev->start, (uintmax_t)prev->end,


More information about the svn-src-all mailing list