summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-01-28 00:48:01 +0000
committergVisor bot <gvisor-bot@google.com>2020-01-28 00:48:01 +0000
commit4a2ad3da63a274934e0f4d9b38468ef43b61dd38 (patch)
treedb5f73d9dbd22a6c864ad4f99f7227795868e3a9
parente5a999a2b4e56ea600818877b08d0e74869cb014 (diff)
parentdb68c85ab707b992c27d66b095165a33a621dc2d (diff)
Merge release-20200115.0-113-gdb68c85 (automated)
-rwxr-xr-xpkg/sentry/kernel/tty.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/sentry/kernel/tty.go b/pkg/sentry/kernel/tty.go
index 464d2306a..d0e0810e8 100755
--- a/pkg/sentry/kernel/tty.go
+++ b/pkg/sentry/kernel/tty.go
@@ -33,6 +33,8 @@ type TTY struct {
// TTY returns the thread group's controlling terminal. If nil, there is no
// controlling terminal.
func (tg *ThreadGroup) TTY() *TTY {
+ tg.pidns.owner.mu.RLock()
+ defer tg.pidns.owner.mu.RUnlock()
tg.signalHandlers.mu.Lock()
defer tg.signalHandlers.mu.Unlock()
return tg.tty