Author: jhb
Date: Fri Jun 29 17:12:03 2012
New Revision: 237803
URL: http://svn.freebsd.org/changeset/base/237803
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/9/sys/vm/vm_map.c
Directory Properties:
stable/9/sys/ (props changed)
stable/9/sys/amd64/include/xen/ (props changed)
stable/9/sys/boot/ (props changed)
stable/9/sys/boot/i386/efi/ (props changed)
stable/9/sys/boot/ia64/efi/ (props changed)
stable/9/sys/boot/ia64/ski/ (props changed)
stable/9/sys/boot/powerpc/boot1.chrp/ (props changed)
stable/9/sys/boot/powerpc/ofw/ (props changed)
stable/9/sys/cddl/contrib/opensolaris/ (props changed)
stable/9/sys/conf/ (props changed)
stable/9/sys/contrib/dev/acpica/ (props changed)
stable/9/sys/contrib/octeon-sdk/ (props changed)
stable/9/sys/contrib/pf/ (props changed)
stable/9/sys/contrib/x86emu/ (props changed)
stable/9/sys/dev/ (props changed)
stable/9/sys/dev/e1000/ (props changed)
stable/9/sys/dev/isp/ (props changed)
stable/9/sys/dev/ixgbe/ (props changed)
stable/9/sys/fs/ (props changed)
stable/9/sys/fs/ntfs/ (props changed)
stable/9/sys/modules/ (props changed)
Modified: stable/9/sys/vm/vm_map.c
==============================================================================
--- stable/9/sys/vm/vm_map.c Fri Jun 29 17:05:13 2012 (r237802)
+++ stable/9/sys/vm/vm_map.c Fri Jun 29 17:12:03 2012 (r237803)
@@ -475,12 +475,14 @@ static void
vm_map_process_deferred(void)
{
struct thread *td;
- vm_map_entry_t entry;
+ vm_map_entry_t entry, next;
vm_object_t object;
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;
if ((entry->eflags & MAP_ENTRY_VN_WRITECNT) != 0) {
/*
* Decrement the object's writemappings and
@@ -494,6 +496,7 @@ vm_map_process_deferred(void)
entry->end);
}
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-unsubscribe@freebsd.org"