svn commit: r280434 - head/sys/x86/iommu
Konstantin Belousov
kib at FreeBSD.org
Tue Mar 24 12:46:23 UTC 2015
Author: kib
Date: Tue Mar 24 12:46:21 2015
New Revision: 280434
URL: https://svnweb.freebsd.org/changeset/base/280434
Log:
Assert that the mapping loop makes progress.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Modified:
head/sys/x86/iommu/intel_idpgtbl.c
Modified: head/sys/x86/iommu/intel_idpgtbl.c
==============================================================================
--- head/sys/x86/iommu/intel_idpgtbl.c Tue Mar 24 11:33:34 2015 (r280433)
+++ head/sys/x86/iommu/intel_idpgtbl.c Tue Mar 24 12:46:21 2015 (r280434)
@@ -465,6 +465,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-head
mailing list