FreeBSD Bugzilla – Attachment 135561 Details for
Bug 180499
[PATCH] fix emulators/open-vm-tools after r248084
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.87 KB, created by
Enji Cooper
on 2013-07-12 18:10:00 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Enji Cooper
Created:
2013-07-12 18:10:00 UTC
Size:
1.87 KB
patch
obsolete
>--- modules/freebsd/vmmemctl/os.c.orig 2011-09-21 11:25:15.000000000 -0700 >+++ modules/freebsd/vmmemctl/os.c 2013-07-08 22:22:19.000000000 -0700 >@@ -37,9 +37,11 @@ > #include <sys/param.h> > #include <sys/systm.h> > #include <sys/kernel.h> >+#include <sys/lock.h> > #include <sys/malloc.h> > #include <sys/module.h> > #include <sys/conf.h> >+#include <sys/rwlock.h> > #include <sys/sysctl.h> > > #include <vm/vm.h> >@@ -344,12 +346,31 @@ > os_state *state = &global_state; > os_pmap *pmap = &state->pmap; > >- if ( !vm_page_lookup(state->vmobject, page->pindex) ) { >- return; >- } > >- os_pmap_putindex(pmap, page->pindex); >- vm_page_free(page); >+#if __FreeBSD_version > 1000029 >+ VM_OBJECT_WLOCK(state->vmobject); >+#else >+ VM_OBJECT_LOCK(state->vmobject); >+#endif >+ if ( vm_page_lookup(state->vmobject, page->pindex) ) { >+ os_pmap_putindex(pmap, page->pindex); >+#if __FreeBSD_version >= 900000 >+ vm_page_lock(page); >+#else >+ vm_page_lock_queues(); >+#endif >+ vm_page_free(page); >+#if __FreeBSD_version >= 900000 >+ vm_page_unlock(page); >+#else >+ vm_page_unlock_queues(); >+#endif >+ } >+#if __FreeBSD_version > 1000029 >+ VM_OBJECT_WUNLOCK(state->vmobject); >+#else >+ VM_OBJECT_UNLOCK(state->vmobject); >+#endif > } > > >@@ -361,8 +382,19 @@ > os_state *state = &global_state; > os_pmap *pmap = &state->pmap; > >+#if __FreeBSD_version > 1000029 >+ VM_OBJECT_WLOCK(state->vmobject); >+#else >+ VM_OBJECT_LOCK(state->vmobject); >+#endif >+ > pindex = os_pmap_getindex(pmap); > if (pindex == (vm_pindex_t)-1) { >+#if __FreeBSD_version > 1000029 >+ VM_OBJECT_WUNLOCK(state->vmobject); >+#else >+ VM_OBJECT_UNLOCK(state->vmobject); >+#endif > return NULL; > } > >@@ -383,6 +415,11 @@ > if (!page) { > os_pmap_putindex(pmap, pindex); > } >+#if __FreeBSD_version > 1000029 >+ VM_OBJECT_WUNLOCK(state->vmobject); >+#else >+ VM_OBJECT_UNLOCK(state->vmobject); >+#endif > > return page; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 180499
: 135561