diff options
author | Jamie Liu <jamieliu@google.com> | 2018-08-07 13:08:37 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-08-07 13:09:42 -0700 |
commit | c036da5dffdf6cad912abe2723e69c04b59430b7 (patch) | |
tree | f5e25e02d4406d3795485e832bff1b65d1b9ee35 /pkg | |
parent | 7d3684aadf71255d3d8442ae1ed0b0f0048f95a3 (diff) |
Hold TaskSet.mu in Task.Parent.
PiperOrigin-RevId: 207766238
Change-Id: Id3b66d8fe1f44c3570f67fa5ae7ba16021e35be1
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/sentry/kernel/threads.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/sentry/kernel/threads.go b/pkg/sentry/kernel/threads.go index 844213c35..3d5713106 100644 --- a/pkg/sentry/kernel/threads.go +++ b/pkg/sentry/kernel/threads.go @@ -441,6 +441,8 @@ func (t *Task) Timekeeper() *Timekeeper { // Parent returns t's parent. func (t *Task) Parent() *Task { + t.tg.pidns.owner.mu.RLock() + defer t.tg.pidns.owner.mu.RUnlock() return t.parent } |