aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2018-05-24 17:32:00 -0400
committerDave Barach <openvpp@barachs.net>2018-05-30 18:56:29 +0000
commit2302d0dfa27a348d96a6c9a7d667bd910280a098 (patch)
treec4b7709554a34d29cf869ea80b4f8d0562ebf328
parent2857b14e22088c430753d108786748e3dc7a56fc (diff)
VPP-1286: close the fd after mmap-ing svm segments
Broken for years. Duh. Change-Id: Ie5fb8e802f143aacd3301c45b136b24a8d4f6d74 Signed-off-by: Dave Barach <dave@barachs.net> (cherry picked from commit ada24ea7012448b75d57ab87a6b7796c55bc44f5)
-rw-r--r--src/svm/svm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/svm/svm.c b/src/svm/svm.c
index 16a58fa126a..27869b6e08f 100644
--- a/src/svm/svm.c
+++ b/src/svm/svm.c
@@ -721,6 +721,8 @@ svm_map_region (svm_map_region_args_t * a)
return (0);
}
+ close (svm_fd);
+
if ((uword) rp != rp->virtual_base)
{
clib_warning ("mmap botch");