From a7b7b7b9804e9968c1fed5f7b3849233f585a88b Mon Sep 17 00:00:00 2001 From: Dean Deng Date: Wed, 14 Oct 2020 00:11:00 -0700 Subject: Fix shm reference leak. All shm segments in an IPC namespace should be released once that namespace is destroyed. Add reference counting to IPCNamespace so that once the last task with a reference on it exits, we can trigger a destructor that will clean up all shm segments that have not been explicitly freed by the application. PiperOrigin-RevId: 337032977 --- pkg/sentry/kernel/shm/BUILD | 1 + 1 file changed, 1 insertion(+) (limited to 'pkg/sentry/kernel/shm/BUILD') diff --git a/pkg/sentry/kernel/shm/BUILD b/pkg/sentry/kernel/shm/BUILD index b7e4b480d..f8a382fd8 100644 --- a/pkg/sentry/kernel/shm/BUILD +++ b/pkg/sentry/kernel/shm/BUILD @@ -27,6 +27,7 @@ go_library( "//pkg/context", "//pkg/log", "//pkg/refs", + "//pkg/refs_vfs2", "//pkg/sentry/device", "//pkg/sentry/fs", "//pkg/sentry/kernel/auth", -- cgit v1.2.3