summaryrefslogtreecommitdiffstats
path: root/tools/lib
diff options
context:
space:
mode:
authorDelyan Kratunov <delyank@meta.com>2022-10-21 19:36:38 +0000
committerAlexei Starovoitov <ast@kernel.org>2022-10-21 13:58:09 -0700
commiteb814cf1adea0ce24413c26c22e9f1a556a45d34 (patch)
tree57f74ecffec4ad4400e21b78f6afe43007d9d3a9 /tools/lib
parent12f96823a9d7724f819424f6232d9e46a56e80d1 (diff)
downloadlinux-eb814cf1adea0ce24413c26c22e9f1a556a45d34.tar.bz2
selftests/bpf: fix task_local_storage/exit_creds rcu usage
BPF CI has revealed flakiness in the task_local_storage/exit_creds test. The failure point in CI [1] is that null_ptr_count is equal to 0, which indicates that the program hasn't run yet. This points to the kern_sync_rcu (sys_membarrier -> synchronize_rcu underneath) not waiting sufficiently. Indeed, synchronize_rcu only waits for read-side sections that started before the call. If the program execution starts *during* the synchronize_rcu invocation (due to, say, preemption), the test won't wait long enough. As a speculative fix, make the synchornize_rcu calls in a loop until an explicit run counter has gone up. [1]: https://github.com/kernel-patches/bpf/actions/runs/3268263235/jobs/5374940791 Signed-off-by: Delyan Kratunov <delyank@meta.com> Link: https://lore.kernel.org/r/156d4ef82275a074e8da8f4cffbd01b0c1466493.camel@meta.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/lib')
0 files changed, 0 insertions, 0 deletions