diff options
author | Rahat Mahmood <rahat@google.com> | 2021-04-12 15:10:19 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-04-12 15:12:52 -0700 |
commit | f4f6ce337aa8ceb46a5a8f783efb770c9a8a2858 (patch) | |
tree | fa83751227b9275b0407df9f3ec4c8145d4fd982 /pkg/sentry/kernel | |
parent | 982fc8b5765795493c25f07d5f86c20a4fc940c1 (diff) |
Don't grab TaskSet mu recursively when reading task state.
Reported-by: syzbot+a6ef0f95a2c9e7da26f3@syzkaller.appspotmail.com
Reported-by: syzbot+2eaf8a9f115edec468fe@syzkaller.appspotmail.com
PiperOrigin-RevId: 368093861
Diffstat (limited to 'pkg/sentry/kernel')
-rw-r--r-- | pkg/sentry/kernel/kernel.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/sentry/kernel/kernel.go b/pkg/sentry/kernel/kernel.go index 9a4fd64cb..e6e9da898 100644 --- a/pkg/sentry/kernel/kernel.go +++ b/pkg/sentry/kernel/kernel.go @@ -1854,7 +1854,7 @@ func (k *Kernel) Release() { func (k *Kernel) PopulateNewCgroupHierarchy(root Cgroup) { k.tasks.mu.RLock() k.tasks.forEachTaskLocked(func(t *Task) { - if t.ExitState() != TaskExitNone { + if t.exitState != TaskExitNone { return } t.mu.Lock() @@ -1870,7 +1870,7 @@ func (k *Kernel) PopulateNewCgroupHierarchy(root Cgroup) { func (k *Kernel) ReleaseCgroupHierarchy(hid uint32) { k.tasks.mu.RLock() k.tasks.forEachTaskLocked(func(t *Task) { - if t.ExitState() != TaskExitNone { + if t.exitState != TaskExitNone { return } t.mu.Lock() |