aboutsummaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2021-01-02 22:27:20 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2021-01-11 20:57:58 +0000
commit4174e45fb4320dc27969c3fcbdd7d06e3b1150b8 (patch)
tree2f57bd1a80f9f7b16dcf5f16d365021717013e72 /lib/libc
parent9a8f5f5cf5ba834bbaa0b80178895305afd031d2 (diff)
downloadsrc-4174e45fb4320dc27969c3fcbdd7d06e3b1150b8.tar.gz
src-4174e45fb4320dc27969c3fcbdd7d06e3b1150b8.zip
amd64 pmap: do not sleep in pmap_allocpte_alloc() with zero referenced page table page.
Otherwise parallel pmap_allocpte_alloc() for nearby va might also fail allocating page table page and free the page under us. The end result is that we could dereference unmapped pte when doing cleanup after sleep. Instead, on allocation failure, first free everything, only then we can drop pmap mutex and sleep safely, right before returning to caller. Split inner non-sleepable part of the pmap_allocpte_alloc() into a new helper pmap_allocpte_nosleep(). Reviewed by: markj Reported and tested by: pho Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27956
Diffstat (limited to 'lib/libc')
0 files changed, 0 insertions, 0 deletions