Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Mar 2015 00:55:13 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r280873 - stable/10/sys/x86/iommu
Message-ID:  <201503310055.t2V0tDWH033259@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201503310055.t2V0tDWH033259>