diff options
| author | John Dyson <dyson@FreeBSD.org> | 1997-04-06 02:29:45 +0000 |
|---|---|---|
| committer | John Dyson <dyson@FreeBSD.org> | 1997-04-06 02:29:45 +0000 |
| commit | a04c970a7aa272333bfa26014f64f461006db115 (patch) | |
| tree | 7f44b39c3ec4c8480e0c5bb681be805c35f38d39 /sys/vm/vm_map.c | |
| parent | ef0e2ea4c70dd308948a5d2358210713ae1cf6fd (diff) | |
Notes
Diffstat (limited to 'sys/vm/vm_map.c')
| -rw-r--r-- | sys/vm/vm_map.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index 4019a8b8bb11..95b2817ee3ad 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id$ + * $Id: vm_map.c,v 1.72 1997/02/22 09:48:23 peter Exp $ */ /* @@ -2323,13 +2323,21 @@ RetryLookup:; vm_map_unlock_read(old_map); goto RetryLookup; } + /* * Check whether this task is allowed to have this page. + * Note the special case for MAP_ENTRY_COW + * pages with an override. This is to implement a forced + * COW for debuggers. */ prot = entry->protection; - if ((fault_type & (prot)) != fault_type) - RETURN(KERN_PROTECTION_FAILURE); + if ((fault_type & VM_PROT_OVERRIDE_WRITE) == 0 || + (entry->eflags & MAP_ENTRY_COW) == 0 || + (entry->wired_count != 0)) { + if ((fault_type & (prot)) != fault_type) + RETURN(KERN_PROTECTION_FAILURE); + } /* * If this page is not pageable, we have to get it for all possible |
