diff options
author | Tiwei Bie <tiwei.btw@antgroup.com> | 2020-09-24 14:16:12 +0800 |
---|---|---|
committer | Tiwei Bie <tiwei.btw@antgroup.com> | 2020-09-24 14:16:12 +0800 |
commit | 71f8cab91b2005c9e3ab904e3a2cba99cb031230 (patch) | |
tree | 6e89cb64281c7a027355322a44e96792308436a1 /pkg/sentry/socket/unix/BUILD | |
parent | 332e1716fc93e3f2ffe6961d3c296503d2079bc8 (diff) |
Fix socket record leak in VFS2
VFS2 socket record is not removed from the system-wide
socket table when the socket is released, which will lead
to a memory leak. This patch fixes this issue.
Fixes: #3874
Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com>
Diffstat (limited to 'pkg/sentry/socket/unix/BUILD')
-rw-r--r-- | pkg/sentry/socket/unix/BUILD | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/pkg/sentry/socket/unix/BUILD b/pkg/sentry/socket/unix/BUILD index a89583dad..cc7408698 100644 --- a/pkg/sentry/socket/unix/BUILD +++ b/pkg/sentry/socket/unix/BUILD @@ -7,10 +7,21 @@ go_template_instance( name = "socket_refs", out = "socket_refs.go", package = "unix", - prefix = "socketOpsCommon", + prefix = "socketOperations", template = "//pkg/refs_vfs2:refs_template", types = { - "T": "socketOpsCommon", + "T": "SocketOperations", + }, +) + +go_template_instance( + name = "socket_vfs2_refs", + out = "socket_vfs2_refs.go", + package = "unix", + prefix = "socketVFS2", + template = "//pkg/refs_vfs2:refs_template", + types = { + "T": "SocketVFS2", }, ) @@ -20,6 +31,7 @@ go_library( "device.go", "io.go", "socket_refs.go", + "socket_vfs2_refs.go", "unix.go", "unix_vfs2.go", ], |