mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
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
This commit is contained in:
committed by
gVisor bot
parent
982fc8b576
commit
f4f6ce337a
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user