diff options
Diffstat (limited to 'pkg/sentry/kernel')
-rw-r--r-- | pkg/sentry/kernel/kernel.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/sentry/kernel/kernel.go b/pkg/sentry/kernel/kernel.go index a9994f23b..b8953657c 100644 --- a/pkg/sentry/kernel/kernel.go +++ b/pkg/sentry/kernel/kernel.go @@ -676,6 +676,10 @@ func (k *Kernel) CreateProcess(args CreateProcessArgs) (*ThreadGroup, ThreadID, root := args.Root if root == nil { root = fs.RootFromContext(ctx) + // Is the root STILL nil? + if root == nil { + return nil, 0, fmt.Errorf("CreateProcessArgs.Root was not provided, and failed to get root from context") + } } defer root.DecRef() args.Root = nil |