summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/inet
diff options
context:
space:
mode:
authorAndrei Vagin <avagin@gmail.com>2021-09-23 18:14:10 -0700
committerAndrei Vagin <avagin@gmail.com>2021-09-23 18:28:08 -0700
commitdcbbd67cacb646838174b5c2a6e7db4e6c212cd5 (patch)
treec7a23ebe9df90ce520750ae5b7c2d02cb854b415 /pkg/sentry/inet
parent586f147cd6f0324328a318324049b2b54e3e7bcd (diff)
kernel: allow to access Task.netns without taking Task.mu
This allows to avoind unnecessary lock-ordering dependencies on task.mu.
Diffstat (limited to 'pkg/sentry/inet')
-rw-r--r--pkg/sentry/inet/BUILD13
1 files changed, 13 insertions, 0 deletions
diff --git a/pkg/sentry/inet/BUILD b/pkg/sentry/inet/BUILD
index 5bba9de0b..2363cec5f 100644
--- a/pkg/sentry/inet/BUILD
+++ b/pkg/sentry/inet/BUILD
@@ -1,13 +1,26 @@
load("//tools:defs.bzl", "go_library")
+load("//tools/go_generics:defs.bzl", "go_template_instance")
package(
default_visibility = ["//:sandbox"],
licenses = ["notice"],
)
+go_template_instance(
+ name = "atomicptr_netns",
+ out = "atomicptr_netns_unsafe.go",
+ package = "inet",
+ prefix = "Namespace",
+ template = "//pkg/sync/atomicptr:generic_atomicptr",
+ types = {
+ "Value": "Namespace",
+ },
+)
+
go_library(
name = "inet",
srcs = [
+ "atomicptr_netns_unsafe.go",
"context.go",
"inet.go",
"namespace.go",