Fix races in kernel.(*Task).Value()
PiperOrigin-RevId: 209627180 Change-Id: Idc84afd38003427e411df6e75abfabd9174174e1
This commit is contained in:
parent
47d5a12ce5
commit
9c407382b0
|
@ -568,12 +568,18 @@ func (t *Task) Value(key interface{}) interface{} {
|
|||
case CtxPIDNamespace:
|
||||
return t.tg.pidns
|
||||
case CtxUTSNamespace:
|
||||
t.mu.Lock()
|
||||
defer t.mu.Unlock()
|
||||
return t.utsns
|
||||
case CtxIPCNamespace:
|
||||
t.mu.Lock()
|
||||
defer t.mu.Unlock()
|
||||
return t.ipcns
|
||||
case CtxTask:
|
||||
return t
|
||||
case auth.CtxCredentials:
|
||||
t.mu.Lock()
|
||||
defer t.mu.Unlock()
|
||||
return t.creds
|
||||
case context.CtxThreadGroupID:
|
||||
return int32(t.ThreadGroup().ID())
|
||||
|
|
Loading…
Reference in New Issue