diff options
author | dyson <dyson@FreeBSD.org> | 1998-01-21 12:18:00 +0000 |
---|---|---|
committer | dyson <dyson@FreeBSD.org> | 1998-01-21 12:18:00 +0000 |
commit | f3e61df0fe9b1c1f4551b38452c3ef38f8fcaa67 (patch) | |
tree | 72cf9fe1a58d5f812512ccaf0853cc8dd10eba72 /sys/vm | |
parent | a70d82c35d4f357cf76d9ea2f32edf33419d1687 (diff) | |
download | FreeBSD-src-f3e61df0fe9b1c1f4551b38452c3ef38f8fcaa67.zip FreeBSD-src-f3e61df0fe9b1c1f4551b38452c3ef38f8fcaa67.tar.gz |
Allow gdb to work again.
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_map.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index ccbf5d7..e6534b4 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: vm_map.c,v 1.105 1998/01/12 01:44:31 dyson Exp $ + * $Id: vm_map.c,v 1.106 1998/01/17 09:16:51 dyson Exp $ */ /* @@ -2310,15 +2310,17 @@ RetryLookup:; * COW for debuggers. */ - prot = entry->protection; + if (fault_type & VM_PROT_OVERRIDE_WRITE) + prot = entry->max_protection; + else + prot = entry->protection; fault_type &= (VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE); if ((fault_type & prot) != fault_type) { RETURN(KERN_PROTECTION_FAILURE); } - if (entry->wired_count && - (fault_type & VM_PROT_WRITE) && + if (entry->wired_count && (fault_type & VM_PROT_WRITE) && (entry->eflags & MAP_ENTRY_COW) && (fault_typea & VM_PROT_OVERRIDE_WRITE) == 0) { RETURN(KERN_PROTECTION_FAILURE); |