Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Sep 2013 06:15:15 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r255607 - head/sys/amd64/amd64
Message-ID:  <201309160615.r8G6FFqh039079@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Mon Sep 16 06:15:15 2013
New Revision: 255607
URL: http://svnweb.freebsd.org/changeset/base/255607

Log:
  In pmap_copy(), when the copied region is mapped with superpage but does
  not cover entire superpage, avoid copying.  Doing partial copy would
  require demotion, which is incompatible with the already held locks.
  
  Reported by:    cperciva
  Reviewed by:    alc
  Sponsored by:	The FreeBSD Foundation
  MFC after:      1 week
  Approved by:	re (delphij)

Modified:
  head/sys/amd64/amd64/pmap.c

Modified: head/sys/amd64/amd64/pmap.c
==============================================================================
--- head/sys/amd64/amd64/pmap.c	Mon Sep 16 02:01:36 2013	(r255606)
+++ head/sys/amd64/amd64/pmap.c	Mon Sep 16 06:15:15 2013	(r255607)
@@ -4356,6 +4356,8 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm
 			continue;
 			
 		if (srcptepaddr & PG_PS) {
+			if ((addr & PDRMASK) != 0 || addr + NBPDR > end_addr)
+				continue;
 			dstmpde = pmap_allocpde(dst_pmap, addr, NULL);
 			if (dstmpde == NULL)
 				break;



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