svn commit: r367081 - head/sys/arm64/arm64

Mark Johnston markj at FreeBSD.org
Tue Oct 27 13:27:48 UTC 2020


Author: markj
Date: Tue Oct 27 13:27:47 2020
New Revision: 367081
URL: https://svnweb.freebsd.org/changeset/base/367081

Log:
  arm64: Remove a racy KASSERT from pmap_remove_pages()
  
  PCPU_GET(curpmap) expands to multiple instructions on arm64, and if the
  current thread is migrated in between execution of those instructions, a
  stale value may be used in the assertion condition.
  
  Diagnosed by:	mmel
  Reported by:	mmel, Bob Prohaska <fbsd at www.zefox.net>
  Submitted by:	alc
  MFC after:	1 week

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

Modified: head/sys/arm64/arm64/pmap.c
==============================================================================
--- head/sys/arm64/arm64/pmap.c	Tue Oct 27 13:13:04 2020	(r367080)
+++ head/sys/arm64/arm64/pmap.c	Tue Oct 27 13:27:47 2020	(r367081)
@@ -4838,8 +4838,6 @@ pmap_remove_pages(pmap_t pmap)
 	int allfree, field, freed, idx, lvl;
 	vm_paddr_t pa;
 
-	KASSERT(pmap == PCPU_GET(curpmap), ("non-current pmap %p", pmap));
-
 	lock = NULL;
 
 	SLIST_INIT(&free);


More information about the svn-src-all mailing list