From 116f5c85ffb359cb489053514028fb2e47d2915f Mon Sep 17 00:00:00 2001 From: Alex Hornung Date: Sun, 13 Jun 2010 09:07:25 +0100 Subject: [PATCH] linux emu - MPSAFE work - acquire token for mmap --- sys/emulation/linux/i386/linux_machdep.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/emulation/linux/i386/linux_machdep.c b/sys/emulation/linux/i386/linux_machdep.c index 39d4d502b4..d8d3ecb406 100644 --- a/sys/emulation/linux/i386/linux_machdep.c +++ b/sys/emulation/linux/i386/linux_machdep.c @@ -632,7 +632,8 @@ linux_mmap_common(caddr_t linux_addr, size_t linux_len, int linux_prot, flags |= MAP_NOSYNC; } - get_mplock(); + lwkt_gettoken(&vm_token); + lwkt_gettoken(&vmspace_token); if (linux_flags & LINUX_MAP_GROWSDOWN) { flags |= MAP_STACK; @@ -716,7 +717,9 @@ linux_mmap_common(caddr_t linux_addr, size_t linux_len, int linux_prot, #endif error = kern_mmap(curproc->p_vmspace, addr, len, prot, flags, fd, pos, &new); - rel_mplock(); + + lwkt_reltoken(&vmspace_token); + lwkt_reltoken(&vm_token); if (error == 0) *res = new; -- 2.41.0