From 1813bf304a02ca1adbb1ee341a3e4282b64582ad Mon Sep 17 00:00:00 2001 From: Andrey Konovalov Date: Wed, 17 May 2017 15:48:16 +0200 Subject: prog: remove unexpected resource generation calls whitelist I think resource being a part of a variable length array or a union option is an acceptable usecase. I've started hitting this panic with some SCTP setsockopts after making SCTP assoc_id a resource. --- prog/rand.go | 6 ------ 1 file changed, 6 deletions(-) (limited to 'prog') diff --git a/prog/rand.go b/prog/rand.go index 0aaf9ab06..0d4596fd3 100644 --- a/prog/rand.go +++ b/prog/rand.go @@ -448,12 +448,6 @@ func (r *randGen) createResource(s *state, res *sys.ResourceType) (arg *Arg, cal arg := resultArg(res, allres[r.Intn(len(allres))]) return arg, calls } - switch meta.Name { - // Return resources in a variable-length array (length can be 0). - case "getgroups", "ioctl$DRM_IOCTL_RES_CTX": - default: - panic(fmt.Sprintf("unexpected call failed to create a resource %v: %v", kind, meta.Name)) - } // Discard unsuccessful calls. for _, c := range calls { foreachArg(c, func(arg, _ *Arg, _ *[]*Arg) { -- cgit mrf-deployment