Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 May 2019 18:40:01 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r347541 - head/sys/vm
Message-ID:  <201905131840.x4DIe1E0049159@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@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);
 		}
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905131840.x4DIe1E0049159>