svn commit: r272197 - head/usr.sbin/bhyvectl

Neel Natu neel at FreeBSD.org
Sat Sep 27 03:43:50 UTC 2014


Author: neel
Date: Sat Sep 27 03:43:49 2014
New Revision: 272197
URL: http://svnweb.freebsd.org/changeset/base/272197

Log:
  After r271635 mmap(2) requires either MAP_PRIVATE or MAP_SHARED
  for non-anonymous mappings.
  
  This gets 'bhyvectl --get-all' working again.
  
  Reported by:	Anish Gupta (akgupt3 at gmail.com)

Modified:
  head/usr.sbin/bhyvectl/bhyvectl.c

Modified: head/usr.sbin/bhyvectl/bhyvectl.c
==============================================================================
--- head/usr.sbin/bhyvectl/bhyvectl.c	Sat Sep 27 02:15:45 2014	(r272196)
+++ head/usr.sbin/bhyvectl/bhyvectl.c	Sat Sep 27 03:43:49 2014	(r272197)
@@ -309,7 +309,7 @@ dump_vmcs_msr_bitmap(int vcpu, u_long ad
 	if (fd < 0)
 		goto done;
 
-	bitmap = mmap(NULL, PAGE_SIZE, PROT_READ, 0, fd, addr);
+	bitmap = mmap(NULL, PAGE_SIZE, PROT_READ, MAP_SHARED, fd, addr);
 	if (bitmap == MAP_FAILED)
 		goto done;
 


More information about the svn-src-all mailing list