Correct a long-standing problem in elfN_map_insert(): In order to copy a

page to user space, the user space mapping must allow write access.

In collaboration with: tegge@
MFC after: 3 weeks
This commit is contained in:
Alan Cox 2005-12-17 19:40:47 +00:00
parent 9d5e4aa8b1
commit 044bbbb523

View File

@ -303,7 +303,7 @@ __elfN(map_insert)(vm_map_t map, vm_object_t object, vm_ooffset_t offset,
* to copy the data. Sigh.
*/
rv = vm_map_find(map, NULL, 0, &start, end - start,
FALSE, prot, max, 0);
FALSE, prot | VM_PROT_WRITE, max, 0);
if (rv)
return (rv);
if (object == NULL)