diff options
author | Damjan Marion <damarion@cisco.com> | 2020-05-24 20:43:10 +0200 |
---|---|---|
committer | Andrew Yourtchenko <ayourtch@gmail.com> | 2020-05-25 16:02:14 +0000 |
commit | 11974e5f5a8e11429e69fbd3c6058c70f30ef697 (patch) | |
tree | 0b534128a80ee9ebee4fa1da03cc74477bc4471a | |
parent | 8b4221ee8f6cd4564dc9b91d1887e88035abca84 (diff) |
vppinfra: fix SIGBUS in bihash init when running unpriviledged
Obserbed when VPP is running in k8s container
Type: fix
Change-Id: Ibbff9c3921bd7f4f97d47cb6f10eed8ed5efe269
Signed-off-by: Damjan Marion <damarion@cisco.com>
-rw-r--r-- | src/vppinfra/bihash_template.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vppinfra/bihash_template.c b/src/vppinfra/bihash_template.c index 47e9bd0113d..2305436dca2 100644 --- a/src/vppinfra/bihash_template.c +++ b/src/vppinfra/bihash_template.c @@ -38,7 +38,7 @@ static inline void *BV (alloc_aligned) (BVT (clib_bihash) * h, uword nbytes) void *base, *rv; uword alloc = alloc_arena_next (h) - alloc_arena_mapped (h); int mmap_flags = MAP_FIXED | MAP_PRIVATE | MAP_ANONYMOUS; - int mmap_flags_huge = (mmap_flags | MAP_HUGETLB | + int mmap_flags_huge = (mmap_flags | MAP_HUGETLB | MAP_LOCKED | BIHASH_LOG2_HUGEPAGE_SIZE << MAP_HUGE_SHIFT); /* new allocation is 25% of existing one */ |