Author: kib Date: Sun Jul 12 12:37:38 2009 New Revision: 195635 URL: http://svn.freebsd.org/changeset/base/195635
Log: When VM_MAP_WIRE_HOLESOK is not specified and vm_map_wire(9) encounters non-readable and non-executable map entry, the entry is skipped from wiring and loop is aborted. But, since MAP_ENTRY_WIRE_SKIPPED was not set for the map entry, its wired_count is later erronously decremented. vm_map_delete(9) for such map entry stuck in "vmmaps". Properly set MAP_ENTRY_WIRE_SKIPPED when aborting the loop. Reported by: John Marshall <john.marshall riverwillow com au> Approved by: re (kensmith) Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Sun Jul 12 09:14:28 2009 (r195634) +++ head/sys/vm/vm_map.c Sun Jul 12 12:37:38 2009 (r195635) @@ -2354,12 +2354,12 @@ vm_map_wire(vm_map_t map, vm_offset_t st if (entry->wired_count == 0) { if ((entry->protection & (VM_PROT_READ|VM_PROT_EXECUTE)) == 0) { + entry->eflags |= MAP_ENTRY_WIRE_SKIPPED; if ((flags & VM_MAP_WIRE_HOLESOK) == 0) { end = entry->end; rv = KERN_INVALID_ADDRESS; goto done; } - entry->eflags |= MAP_ENTRY_WIRE_SKIPPED; goto next_entry; } entry->wired_count++; _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"