diff options
author | Jamie Liu <jamieliu@google.com> | 2020-11-13 14:46:03 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-11-13 14:47:47 -0800 |
commit | a1cb52447f3e9414211b9e0558f1231ae3e59329 (patch) | |
tree | b1618b3e2507f0ec6d2461c1a0ba92d140d4e0a4 /pkg/sentry/kernel/context.go | |
parent | 89517eca414a311598aa6e64a229c7acc5e3a22f (diff) |
Check for misuse of kernel.Task as context.Context.
Checks in Task.block() and Task.Value() are conditional on race detection being
enabled, since these functions are relatively hot. Checks in Task.SleepStart()
and Task.UninterruptibleSleepStart() are enabled unconditionally, since these
functions are not thought to lie on any critical paths, and misuse of these
functions is required for b/168241471 to manifest.
PiperOrigin-RevId: 342342175
Diffstat (limited to 'pkg/sentry/kernel/context.go')
-rw-r--r-- | pkg/sentry/kernel/context.go | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/pkg/sentry/kernel/context.go b/pkg/sentry/kernel/context.go index bb94769c4..a8596410f 100644 --- a/pkg/sentry/kernel/context.go +++ b/pkg/sentry/kernel/context.go @@ -15,8 +15,6 @@ package kernel import ( - "time" - "gvisor.dev/gvisor/pkg/context" ) @@ -98,18 +96,3 @@ func TaskFromContext(ctx context.Context) *Task { } return nil } - -// Deadline implements context.Context.Deadline. -func (*Task) Deadline() (time.Time, bool) { - return time.Time{}, false -} - -// Done implements context.Context.Done. -func (*Task) Done() <-chan struct{} { - return nil -} - -// Err implements context.Context.Err. -func (*Task) Err() error { - return nil -} |