Date: Fri, 13 Dec 2013 06:25:08 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259297 - stable/10/sys/vm Message-ID: <201312130625.rBD6P8Nt087225@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Fri Dec 13 06:25:08 2013 New Revision: 259297 URL: http://svnweb.freebsd.org/changeset/base/259297 Log: MFC r258366: Add assertions to cover all places in the wiring and unwiring code where MAP_ENTRY_IN_TRANSITION is set or cleared. Modified: stable/10/sys/vm/vm_map.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_map.c ============================================================================== --- stable/10/sys/vm/vm_map.c Fri Dec 13 06:12:21 2013 (r259296) +++ stable/10/sys/vm/vm_map.c Fri Dec 13 06:25:08 2013 (r259297) @@ -2288,6 +2288,9 @@ vm_map_unwire(vm_map_t map, vm_offset_t * Mark the entry in case the map lock is released. (See * above.) */ + KASSERT((entry->eflags & MAP_ENTRY_IN_TRANSITION) == 0 && + entry->wiring_thread == NULL, + ("owned map entry %p", entry)); entry->eflags |= MAP_ENTRY_IN_TRANSITION; entry->wiring_thread = curthread; /* @@ -2356,7 +2359,9 @@ done: } } KASSERT((entry->eflags & MAP_ENTRY_IN_TRANSITION) != 0, - ("vm_map_unwire: in-transition flag missing")); + ("vm_map_unwire: in-transition flag missing %p", entry)); + KASSERT(entry->wiring_thread == curthread, + ("vm_map_unwire: alien wire %p", entry)); entry->eflags &= ~MAP_ENTRY_IN_TRANSITION; entry->wiring_thread = NULL; if (entry->eflags & MAP_ENTRY_NEEDS_WAKEUP) { @@ -2456,6 +2461,9 @@ vm_map_wire(vm_map_t map, vm_offset_t st * Mark the entry in case the map lock is released. (See * above.) */ + KASSERT((entry->eflags & MAP_ENTRY_IN_TRANSITION) == 0 && + entry->wiring_thread == NULL, + ("owned map entry %p", entry)); entry->eflags |= MAP_ENTRY_IN_TRANSITION; entry->wiring_thread = curthread; if ((entry->protection & (VM_PROT_READ | VM_PROT_EXECUTE)) == 0
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201312130625.rBD6P8Nt087225>