From 8d15e28d598508dc8a6007d0cdf76b48d8cf8ba0 Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Mon, 20 Jun 2022 12:55:23 +0000 Subject: pkg/instance: don't close vmInst in SetupExecProg That method was not assumed to take ownership of the instance. This can lead to double-closing of it during bisection/patch testing, and therefore to panic(). Closes #3210. --- pkg/instance/execprog.go | 3 --- 1 file changed, 3 deletions(-) (limited to 'pkg/instance/execprog.go') diff --git a/pkg/instance/execprog.go b/pkg/instance/execprog.go index f6f9bfa01..1fa01b620 100644 --- a/pkg/instance/execprog.go +++ b/pkg/instance/execprog.go @@ -44,14 +44,12 @@ func SetupExecProg(vmInst *vm.Instance, mgrCfg *mgrconfig.Config, reporter *repo opt *OptionalConfig) (*ExecProgInstance, error) { execprogBin, err := vmInst.Copy(mgrCfg.ExecprogBin) if err != nil { - vmInst.Close() return nil, &TestError{Title: fmt.Sprintf("failed to copy syz-execprog to VM: %v", err)} } executorBin := mgrCfg.SysTarget.ExecutorBin if executorBin == "" { executorBin, err = vmInst.Copy(mgrCfg.ExecutorBin) if err != nil { - vmInst.Close() return nil, &TestError{Title: fmt.Sprintf("failed to copy syz-executor to VM: %v", err)} } } @@ -68,7 +66,6 @@ func SetupExecProg(vmInst *vm.Instance, mgrCfg *mgrconfig.Config, reporter *repo var err error ret.StraceBin, err = vmInst.Copy(ret.StraceBin) if err != nil { - vmInst.Close() return nil, &TestError{Title: fmt.Sprintf("failed to copy strace bin: %v", err)} } } -- cgit mrf-deployment