git: vm: allow writes to user-wired COW mappings
Aaron LI
aly at crater.dragonflybsd.org
Mon Oct 5 04:08:18 PDT 2026
commit f6679b2697dd08e5d914b57127402922825ea89e
Author: David Bidner <david at crap.solutions>
Date: Sat Oct 3 11:24:23 2026 +0200
vm: allow writes to user-wired COW mappings
A later write to a MAP_PRIVATE mapping that was mlock()ed currently gets
KERN_PROTECTION_FAILURE from vm_map_lookup() because the entry is both
MAP_ENTRY_USER_WIRED and MAP_ENTRY_COW. The normal page-fault path does
not retry with VM_PROT_OVERRIDE_WRITE, so the write never completes and the
process receives SIGSEGV.
Fix the bug by removing the obsolete check so the normal copy-on-write
path runs.
vm_map_user_wiring() already created the shadow object before wiring the
entry, so a later COW is a normal copy into the process's own shadow. The
NEEDS_COPY block below still creates the shadow if it was not created at
wiring time.
Reviewed-by: dillon
Bug: https://bugs.dragonflybsd.org/issues/3431
Summary of changes:
sys/vm/vm_map.c | 8 --------
1 file changed, 8 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/f6679b2697dd08e5d914b57127402922825ea89e
--
DragonFly BSD source repository
More information about the Commits
mailing list