On 10/05, Yafang Shao wrote: > The result as follows, > > $ tools/testing/selftests/bpf/test_progs --name=task_under_cgroup > #237 task_under_cgroup:OK > Summary: 1/0 PASSED, 0 SKIPPED, 0 FAILED > > And no error messages in dmesg. > > Without the prev patch, there will be RCU warnings in dmesg. > > Signed-off-by: Yafang Shao <laoar.shao@xxxxxxxxx> > --- > .../selftests/bpf/prog_tests/task_under_cgroup.c | 8 +++++-- > .../selftests/bpf/progs/test_task_under_cgroup.c | 28 +++++++++++++++++++++- > 2 files changed, 33 insertions(+), 3 deletions(-) > > diff --git a/tools/testing/selftests/bpf/prog_tests/task_under_cgroup.c b/tools/testing/selftests/bpf/prog_tests/task_under_cgroup.c > index 4224727..d1a5a5c 100644 > --- a/tools/testing/selftests/bpf/prog_tests/task_under_cgroup.c > +++ b/tools/testing/selftests/bpf/prog_tests/task_under_cgroup.c > @@ -30,8 +30,12 @@ void test_task_under_cgroup(void) > if (!ASSERT_OK(ret, "test_task_under_cgroup__load")) > goto cleanup; > > - ret = test_task_under_cgroup__attach(skel); > - if (!ASSERT_OK(ret, "test_task_under_cgroup__attach")) > + skel->links.lsm_run = bpf_program__attach_lsm(skel->progs.lsm_run); > + if (!ASSERT_OK_PTR(skel->links.lsm_run, "attach_lsm")) > + goto cleanup; > + So we rely on the second attach here to trigger the program above? Maybe add a comment? Otherwise we might risk loosing this dependency after some refactoring... Other than that, both patches look good to me, feel free to use for both if/when you resend: Acked-by: Stanislav Fomichev <sdf@xxxxxxxxxx>