This commit adds a MFD_CLOEXEC flag to avoid memory leaks through child process
when VPP crashes.
Type: fix
Change-Id: Icd155102884f6e96bbe62149cc07f7cbfca77854
Signed-off-by: Paul Ponchon <[email protected]>
memfd_flags = MFD_HUGETLB | log2_page_size << MFD_HUGE_SHIFT;
}
+ /* Set FD_CLOEXEC flag on memory file descriptor, such that mapped memory
+ * doesn't leak through child processes if VPP crashes. */
+ memfd_flags |= MFD_CLOEXEC;
+
va_start (va, fmt);
s = va_format (0, fmt, &va);
va_end (va);