summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/kernel/task.go
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/kernel/task.go
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/kernel/task.go')
-rw-r--r--pkg/sentry/kernel/task.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/sentry/kernel/task.go b/pkg/sentry/kernel/task.go
index 9a95bf44c..2eebd1b47 100644
--- a/pkg/sentry/kernel/task.go
+++ b/pkg/sentry/kernel/task.go
@@ -513,7 +513,7 @@ type Task struct {
// netns is the task's network namespace. netns is never nil.
//
// netns is protected by mu.
- netns *inet.Namespace
+ netns inet.NamespaceAtomicPtr
// If rseqPreempted is true, before the next call to p.Switch(),
// interrupt rseq critical regions as defined by rseqAddr and