aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Konovalov <andreyknvl@google.com>2017-05-17 15:48:16 +0200
committerAndrey Konovalov <andreyknvl@google.com>2017-05-26 16:24:32 +0200
commit1813bf304a02ca1adbb1ee341a3e4282b64582ad (patch)
treef1c6130141ed25962c8907d3aed5c6dd94378537
parent209dba01113133ca87a36e9d0b3a52a6cdec67c3 (diff)
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.
-rw-r--r--prog/rand.go6
1 files changed, 0 insertions, 6 deletions
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) {