diff options
author | Ken Brown <kbrown@cornell.edu> | 2024-12-18 11:39:31 -0500 |
---|---|---|
committer | Ken Brown <kbrown@cornell.edu> | 2024-12-19 10:25:53 -0500 |
commit | 677e3150907a83f17e50d546f79b7ca863ebd77d (patch) | |
tree | 400bc4ab852e66b5c8ae2aa6ce6f57b25a7ea16a /winsup/cygwin/select.h | |
parent | efa5401ea998ee01d79c63449f51cd36df938f42 (diff) | |
download | newlib-677e3150907a83f17e50d546f79b7ca863ebd77d.zip newlib-677e3150907a83f17e50d546f79b7ca863ebd77d.tar.gz newlib-677e3150907a83f17e50d546f79b7ca863ebd77d.tar.bz2 |
Cygwin: mmap: fix protection when unused pages are recycled
Previously, when unused pages from an mmap_record were recycled, they
were given the protection of the mmap_record rather than the
protection requested in the mmap call. Fix this by adding a
"new_prot" parameter to mmap_list::try_map() and
mmap_record::map_pages() to keep track of the requested protection.
Then use new_prot in the calls to VirtualProtect().
Addresses: https://cygwin.com/pipermail/cygwin/2024-December/256911.html
Fixes: f90e23f2714cb ("*autoload.cc (NtCreateSection): Define.")
Signed-off-by: Ken Brown <kbrown@cornell.edu>
Diffstat (limited to 'winsup/cygwin/select.h')
0 files changed, 0 insertions, 0 deletions