VPP-1286: close the fd after mmap-ing svm segments 32/12732/2
authorDave Barach <[email protected]>
Thu, 24 May 2018 21:32:00 +0000 (17:32 -0400)
committerDave Barach <[email protected]>
Wed, 30 May 2018 18:56:29 +0000 (18:56 +0000)
Broken for years. Duh.

Change-Id: Ie5fb8e802f143aacd3301c45b136b24a8d4f6d74
Signed-off-by: Dave Barach <[email protected]>
(cherry picked from commit ada24ea7012448b75d57ab87a6b7796c55bc44f5)

src/svm/svm.c

index 16a58fa..27869b6 100644 (file)
@@ -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");