diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-06-24 22:40:17 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-06-24 22:40:17 +0000 |
commit | 958eef3de2e99197b2852a49e3c2d48a10b80326 (patch) | |
tree | 9bc54913813c2639138682da8328eec448a2487c /pkg/sentry | |
parent | 495f8d24cd17ad1c1371f1310adbc49261faf50e (diff) | |
parent | 2e6195ffe0ad452b2137c32d635d890c9d872e8d (diff) |
Merge release-20210614.0-24-g2e6195ffe (automated)
Diffstat (limited to 'pkg/sentry')
-rw-r--r-- | pkg/sentry/kernel/sessions.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/sentry/kernel/sessions.go b/pkg/sentry/kernel/sessions.go index ca9076406..973d708a3 100644 --- a/pkg/sentry/kernel/sessions.go +++ b/pkg/sentry/kernel/sessions.go @@ -369,6 +369,11 @@ func (tg *ThreadGroup) CreateProcessGroup() error { // Get the ID for this thread in the current namespace. id := tg.pidns.tgids[tg] + // Check whether a process still exists or not. + if id == 0 { + return syserror.ESRCH + } + // Per above, check for a Session leader or existing group. for s := tg.pidns.owner.sessions.Front(); s != nil; s = s.Next() { if s.leader.pidns != tg.pidns { |