Author: jhb
Date: Fri Jun 29 17:12:26 2012
New Revision: 237804
URL: http://svn.freebsd.org/changeset/base/237804

Log:
  MFC 237334:
  Move the per-thread deferred user map entries list into a private list
  in vm_map_process_deferred() which is then iterated to release map entries.
  This avoids having a nested vm map unlock operation called from the loop
  body attempt to recuse into vm_map_process_deferred().  This can happen if
  the vm_map_remove() triggers the OOM killer.

Modified:
  stable/8/sys/vm/vm_map.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/boot/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/e1000/   (props changed)

Modified: stable/8/sys/vm/vm_map.c
==============================================================================
--- stable/8/sys/vm/vm_map.c    Fri Jun 29 17:12:03 2012        (r237803)
+++ stable/8/sys/vm/vm_map.c    Fri Jun 29 17:12:26 2012        (r237804)
@@ -457,13 +457,15 @@ static void
 vm_map_process_deferred(void)
 {
        struct thread *td;
-       vm_map_entry_t entry;
+       vm_map_entry_t entry, next;
 
        td = curthread;
-
-       while ((entry = td->td_map_def_user) != NULL) {
-               td->td_map_def_user = entry->next;
+       entry = td->td_map_def_user;
+       td->td_map_def_user = NULL;
+       while (entry != NULL) {
+               next = entry->next;
                vm_map_entry_deallocate(entry, FALSE);
+               entry = next;
        }
 }
 
_______________________________________________
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"

Reply via email to