aboutsummaryrefslogtreecommitdiffstats
path: root/src/svm/ssvm.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2021-01-05 23:15:49 -0800
committerDave Barach <openvpp@barachs.net>2021-01-06 19:00:37 +0000
commit4da0ea98c282fbc7a747d255a38e969406f202f4 (patch)
treeb7d4105e567701cc1c9145796d49b92ed4997c98 /src/svm/ssvm.c
parent86cff9cdaaffd795795c80e5bc0874390a14b3e1 (diff)
svm: force fixed memfd mapping if va provided
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I6a2cc596cf0b7f29d3ae1c05b1bb6b748b558175
Diffstat (limited to 'src/svm/ssvm.c')
-rw-r--r--src/svm/ssvm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/svm/ssvm.c b/src/svm/ssvm.c
index 1a677fc5c62..f93f40d0526 100644
--- a/src/svm/ssvm.c
+++ b/src/svm/ssvm.c
@@ -304,9 +304,6 @@ ssvm_client_init_memfd (ssvm_private_t * memfd)
return SSVM_API_ERROR_MMAP;
}
- if (memfd->requested_va)
- mmap_flags |= MAP_FIXED;
-
/*
* Map the segment once, to look at the shared header
*/
@@ -324,6 +321,9 @@ ssvm_client_init_memfd (ssvm_private_t * memfd)
memfd->ssvm_size = sh->ssvm_size;
munmap (sh, page_size);
+ if (memfd->requested_va)
+ mmap_flags |= MAP_FIXED;
+
/*
* Remap the segment at the 'right' address
*/