Skip to content

Commit

Permalink
arm64: Remove a racy KASSERT from pmap_remove_pages()
Browse files Browse the repository at this point in the history
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@www.zefox.net>
Submitted by:	alc
MFC after:	1 week
  • Loading branch information
markjdb committed Oct 27, 2020
1 parent bd43fdc commit bde1566
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions sys/arm64/arm64/pmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit bde1566

Please sign in to comment.