]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Fix race condition in enable_stats
authorYucong Sun <sunyucong@gmail.com>
Wed, 6 Oct 2021 18:56:11 +0000 (11:56 -0700)
committerAndrii Nakryiko <andrii@kernel.org>
Fri, 8 Oct 2021 22:10:43 +0000 (15:10 -0700)
commit6a19d3c2b197c15dc69b6fa134c494522f82eb7f
tree363c270ccc427c5772f6802454a647321dd913a3
parent4a3be0d52f52bc4eb9fec71ee2d2e06d61b5968a
selftests/bpf: Fix race condition in enable_stats

In parallel execution mode, this test now need to use atomic operation
to avoid race condition.

Signed-off-by: Yucong Sun <sunyucong@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20211006185619.364369-7-fallentree@fb.com
tools/testing/selftests/bpf/progs/test_enable_stats.c