svn commit: r280873 - stable/10/sys/x86/iommu

Konstantin Belousov kib at FreeBSD.org
Tue Mar 31 00:55:13 UTC 2015


Author: kib
Date: Tue Mar 31 00:55:12 2015
New Revision: 280873
URL: https://svnweb.freebsd.org/changeset/base/280873

Log:
  MFC r280434:
  Assert that the mapping loop makes progress.

Modified:
  stable/10/sys/x86/iommu/intel_idpgtbl.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/x86/iommu/intel_idpgtbl.c
==============================================================================
--- stable/10/sys/x86/iommu/intel_idpgtbl.c	Tue Mar 31 00:18:00 2015	(r280872)
+++ stable/10/sys/x86/iommu/intel_idpgtbl.c	Tue Mar 31 00:55:12 2015	(r280873)
@@ -464,6 +464,7 @@ ctx_map_buf_locked(struct dmar_ctx *ctx,
 		KASSERT(size >= pg_sz,
 		    ("mapping loop overflow %p %jx %jx %jx", ctx,
 		    (uintmax_t)base, (uintmax_t)size, (uintmax_t)pg_sz));
+		KASSERT(pg_sz > 0, ("pg_sz 0 lvl %d", lvl));
 		pte = ctx_pgtbl_map_pte(ctx, base, lvl, flags, &idx, &sf);
 		if (pte == NULL) {
 			KASSERT((flags & DMAR_PGF_WAITOK) == 0,


More information about the svn-src-all mailing list