diff options
author | Jamie Liu <jamieliu@google.com> | 2021-06-10 12:38:21 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-06-10 12:46:15 -0700 |
commit | 450692e03fe651d75d017c7e2faf4cba10e26f0b (patch) | |
tree | 579c71303ff410c284dbf0f3fa16c4e61689e097 /pkg/sentry/fsimpl/ext/disklayout/extent.go | |
parent | 9ede1a6058131b50340427c8d0fd3a9ccef5e300 (diff) |
Report task exit in /proc/[pid]/{stat,status} before task goroutine exit.
Between when runExitNotify.execute() returns nil (indicating that the task
goroutine should exit) and when Task.run() advances Task.gosched.State to
TaskGoroutineNonexistent (indicating that the task goroutine is exiting), there
is a race window in which the Task is waitable (since TaskSet.mu is unlocked
and Task.exitParentNotified is true) but will be reported by /proc/[pid]/status
as running. Close the window by checking Task.exitState before task goroutine
exit.
PiperOrigin-RevId: 378711484
Diffstat (limited to 'pkg/sentry/fsimpl/ext/disklayout/extent.go')
0 files changed, 0 insertions, 0 deletions