Don't log the task in CgroupPrepareMigrate warning.

This avoids racily accessing task fields.

Reported-by: syzbot+f6ec7db6c2c12de97f29@syzkaller.appspotmail.com
PiperOrigin-RevId: 652976375
This commit is contained in:
Nicolas Lacasse
2024-07-16 14:25:44 -07:00
committed by gVisor bot
parent 410cb04f2d
commit ddfbb50ecc
+1 -1
View File
@@ -156,7 +156,7 @@ func (t *Task) CgroupPrepareMigrate(dst Cgroup) (*CgroupMigrationContext, error)
defer t.mu.Unlock()
src, found := t.findCgroupWithMatchingHierarchyLocked(dst)
if !found {
log.Warningf("Cannot migrate to cgroup %v since task %v not currently in target hierarchy %v", dst, t, dst.HierarchyID())
log.Warningf("Cannot migrate to cgroup %v since task not currently in target hierarchy %v", dst, dst.HierarchyID())
return nil, linuxerr.EINVAL
}
if err := dst.PrepareMigrate(t, &src); err != nil {