aboutsummaryrefslogtreecommitdiff
path: root/emulators
diff options
context:
space:
mode:
authorMartin Blapp <mbr@FreeBSD.org>2009-04-09 21:19:03 +0000
committerMartin Blapp <mbr@FreeBSD.org>2009-04-09 21:19:03 +0000
commitd2ae6a2f47c6e7bce62a5efae40c759353a61e6e (patch)
treeebf5b8b45a1b8cc199006cdf7f4476e2f034bfc8 /emulators
parent99e917a2c8ddc2f4811a0c62ad52c4a2e13c5203 (diff)
downloadports-d2ae6a2f47c6e7bce62a5efae40c759353a61e6e.tar.gz
ports-d2ae6a2f47c6e7bce62a5efae40c759353a61e6e.zip
Notes
Diffstat (limited to 'emulators')
-rw-r--r--emulators/open-vm-tools/Makefile1
-rw-r--r--emulators/open-vm-tools/files/patch-vmmemctl-os.c42
2 files changed, 43 insertions, 0 deletions
diff --git a/emulators/open-vm-tools/Makefile b/emulators/open-vm-tools/Makefile
index ea2890ee8d43..a1618e17a42f 100644
--- a/emulators/open-vm-tools/Makefile
+++ b/emulators/open-vm-tools/Makefile
@@ -7,6 +7,7 @@
PORTNAME= open-vm-tools
PORTVERSION= ${BUILD_VER}
+PORTREVISION= 1
CATEGORIES= emulators kld
MASTER_SITES= SF
DISTNAME= open-vm-tools-${RELEASE_DATE}-${BUILD_VER}
diff --git a/emulators/open-vm-tools/files/patch-vmmemctl-os.c b/emulators/open-vm-tools/files/patch-vmmemctl-os.c
new file mode 100644
index 000000000000..ce4de5836219
--- /dev/null
+++ b/emulators/open-vm-tools/files/patch-vmmemctl-os.c
@@ -0,0 +1,42 @@
+--- modules/freebsd/vmmemctl/os.c.orig 2009-04-09 15:18:08.000000000 -0400
++++ modules/freebsd/vmmemctl/os.c 2009-04-09 15:34:06.000000000 -0400
+@@ -260,12 +260,14 @@
+ os_state *state = &global_state;
+ os_pmap *pmap = &state->pmap;
+
+- if ( !vm_page_lookup(state->vmobject, page->pindex) ) {
+- return;
++ VM_OBJECT_LOCK(state->vmobject);
++ if ( vm_page_lookup(state->vmobject, page->pindex) ) {
++ os_pmap_putindex(pmap, page->pindex);
++ vm_page_lock_queues();
++ vm_page_free(page);
++ vm_page_unlock_queues();
+ }
+-
+- os_pmap_putindex(pmap, page->pindex);
+- vm_page_free(page);
++ VM_OBJECT_UNLOCK(state->vmobject);
+ }
+
+ static vm_page_t os_kmem_alloc(int alloc_normal_failed)
+@@ -275,8 +277,11 @@
+ os_state *state = &global_state;
+ os_pmap *pmap = &state->pmap;
+
++ VM_OBJECT_LOCK(state->vmobject);
++
+ pindex = os_pmap_getindex(pmap);
+ if (pindex == (vm_pindex_t)-1) {
++ VM_OBJECT_UNLOCK(state->vmobject);
+ return NULL;
+ }
+
+@@ -297,6 +302,7 @@
+ if (!page) {
+ os_pmap_putindex(pmap, pindex);
+ }
++ VM_OBJECT_UNLOCK(state->vmobject);
+
+ return page;
+ }