diff options
author | kib <kib@FreeBSD.org> | 2015-03-24 12:46:21 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2015-03-24 12:46:21 +0000 |
commit | 2c4be9847f00e6b4a758b895b15350cc070b6295 (patch) | |
tree | a4ffb19a84dcfbae8bf27fe637fa8c058fb8ca4d /sys/x86/iommu/intel_idpgtbl.c | |
parent | 3e25dd809790d51a127a98e4e63adec200fb302f (diff) | |
download | FreeBSD-src-2c4be9847f00e6b4a758b895b15350cc070b6295.zip FreeBSD-src-2c4be9847f00e6b4a758b895b15350cc070b6295.tar.gz |
Assert that the mapping loop makes progress.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Diffstat (limited to 'sys/x86/iommu/intel_idpgtbl.c')
-rw-r--r-- | sys/x86/iommu/intel_idpgtbl.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/x86/iommu/intel_idpgtbl.c b/sys/x86/iommu/intel_idpgtbl.c index e2cce1a..6621b17 100644 --- a/sys/x86/iommu/intel_idpgtbl.c +++ b/sys/x86/iommu/intel_idpgtbl.c @@ -465,6 +465,7 @@ ctx_map_buf_locked(struct dmar_ctx *ctx, dmar_gaddr_t base, dmar_gaddr_t size, 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, |