svn commit: r347541 - head/sys/vm

Mark Johnston markj at FreeBSD.org
Mon May 13 18:40:02 UTC 2019


Author: markj
Date: Mon May 13 18:40:01 2019
New Revision: 347541
URL: https://svnweb.freebsd.org/changeset/base/347541

Log:
  Restore the pre-r347532 behaviour of ignoring wiring failures in mmap().
  
  The error handling added in r347532 is not right when mapping vnodes
  and will be fixed separately.
  
  Reported by:	syzbot+1d2cc393bd6c88a548be at syzkaller.appspotmail.com
  MFC with:	r347532

Modified:
  head/sys/vm/vm_mmap.c

Modified: head/sys/vm/vm_mmap.c
==============================================================================
--- head/sys/vm/vm_mmap.c	Mon May 13 18:28:40 2019	(r347540)
+++ head/sys/vm/vm_mmap.c	Mon May 13 18:40:01 2019	(r347541)
@@ -1564,12 +1564,10 @@ vm_mmap_object(vm_map_t map, vm_offset_t *addr, vm_siz
 		if ((map->flags & MAP_WIREFUTURE) != 0) {
 			vm_map_lock(map);
 			if ((map->flags & MAP_WIREFUTURE) != 0)
-				rv = vm_map_wire_locked(map, *addr,
+				(void)vm_map_wire_locked(map, *addr,
 				    *addr + size, VM_MAP_WIRE_USER |
 				    ((flags & MAP_STACK) ? VM_MAP_WIRE_HOLESOK :
 				    VM_MAP_WIRE_NOHOLES));
-			if (rv != KERN_SUCCESS)
-				(void)vm_map_delete(map, *addr, *addr + size);
 			vm_map_unlock(map);
 		}
 	}


More information about the svn-src-head mailing list