vm_map.c (9af6d512f51dd0452a9a596471e5212121e4ca79) vm_map.c (5b3e02570aad765ee54aa9ba564aa97f52101227)
1/*-
2 * Copyright (c) 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * The Mach Operating System project at Carnegie-Mellon University.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 3793 unchanged lines hidden (view full) ---

3802 return (KERN_PROTECTION_FAILURE);
3803 }
3804 if ((entry->eflags & MAP_ENTRY_USER_WIRED) &&
3805 (entry->eflags & MAP_ENTRY_COW) &&
3806 (fault_type & VM_PROT_WRITE)) {
3807 vm_map_unlock_read(map);
3808 return (KERN_PROTECTION_FAILURE);
3809 }
1/*-
2 * Copyright (c) 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * The Mach Operating System project at Carnegie-Mellon University.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 3793 unchanged lines hidden (view full) ---

3802 return (KERN_PROTECTION_FAILURE);
3803 }
3804 if ((entry->eflags & MAP_ENTRY_USER_WIRED) &&
3805 (entry->eflags & MAP_ENTRY_COW) &&
3806 (fault_type & VM_PROT_WRITE)) {
3807 vm_map_unlock_read(map);
3808 return (KERN_PROTECTION_FAILURE);
3809 }
3810 if ((fault_typea & VM_PROT_COPY) != 0 &&
3811 (entry->max_protection & VM_PROT_WRITE) == 0 &&
3812 (entry->eflags & MAP_ENTRY_COW) == 0) {
3813 vm_map_unlock_read(map);
3814 return (KERN_PROTECTION_FAILURE);
3815 }
3810
3811 /*
3812 * If this page is not pageable, we have to get it for all possible
3813 * accesses.
3814 */
3815 *wired = (entry->wired_count != 0);
3816 if (*wired)
3817 fault_type = entry->protection;

--- 296 unchanged lines hidden ---
3816
3817 /*
3818 * If this page is not pageable, we have to get it for all possible
3819 * accesses.
3820 */
3821 *wired = (entry->wired_count != 0);
3822 if (*wired)
3823 fault_type = entry->protection;

--- 296 unchanged lines hidden ---