mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
Fix racy seccomp kill on shutdown. When a VM shuts down the event-monitor thread's recv() loop ends and the thread exits. glibc's thread teardown then runs __malloc_arena_thread_freeres, which trims the per-thread malloc arena with madvise(MADV_DONTNEED). Add madvise to the allowed calls to match other threads. The crash is intermittent because it only fires when that thread's arena accumulated trimmable memory by shutdown. Signed-off-by: Dylan Reid <dgreid@fb.com>