From c036da5dffdf6cad912abe2723e69c04b59430b7 Mon Sep 17 00:00:00 2001 From: Jamie Liu Date: Tue, 7 Aug 2018 13:08:37 -0700 Subject: Hold TaskSet.mu in Task.Parent. PiperOrigin-RevId: 207766238 Change-Id: Id3b66d8fe1f44c3570f67fa5ae7ba16021e35be1 --- pkg/sentry/kernel/threads.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pkg/sentry/kernel') 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 } -- cgit v1.2.3