Date: Sat, 27 Sep 2014 03:43:50 +0000 (UTC) From: Neel Natu <neel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272197 - head/usr.sbin/bhyvectl Message-ID: <201409270343.s8R3hovW076435@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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@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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409270343.s8R3hovW076435>