mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
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:
committed by
gVisor bot
parent
410cb04f2d
commit
ddfbb50ecc
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user