On Sat, Dec 01, 2018 at 08:12:34PM +0000, Roman Gushchin wrote: > > From dc70ddb39c2f8d87d64b8d0fd71f4baa956d5f50 Mon Sep 17 00:00:00 2001 > From: Roman Gushchin <guro@xxxxxx> > Date: Sat, 1 Dec 2018 10:39:44 -0800 > Subject: [PATCH v2 bpf] bpf: refactor bpf_test_run() to separate own failures > and test program result > > After commit f42ee093be29 ("bpf/test_run: support cgroup local > storage") the bpf_test_run() function may fail with -ENOMEM, if > it's not possible to allocate memory for a cgroup local storage. > > This error shouldn't be mixed with the return value of the testing > program. Let's add an additional argument with a pointer where to > store the testing program's result; and make bpf_test_run() > return either 0 or -ENOMEM. > > Fixes: f42ee093be29 ("bpf/test_run: support cgroup local storage") > Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> > Suggested-by: Alexei Starovoitov <ast@xxxxxxxxxx> > Signed-off-by: Roman Gushchin <guro@xxxxxx> > Cc: Daniel Borkmann <daniel@xxxxxxxxxxxxx> > Cc: Alexei Starovoitov <ast@xxxxxxxxxx> Applied to bpf tree. Thanks!