Revert "bpf: Fix possible race in inc_misses_counter"

This reverts commit 07058fb18d as it
breaks the KABI.  It will be reverted the next KABI gate in a week.

Fixes: efe3167e52 ("Linux 5.15.27")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I9b8f2522971f5747918d9775b869ca6126d18075
This commit is contained in:
Greg Kroah-Hartman
2022-03-16 18:03:43 +01:00
parent 16f06ae351
commit bb592b6898

View File

@@ -541,12 +541,11 @@ static u64 notrace bpf_prog_start_time(void)
static void notrace inc_misses_counter(struct bpf_prog *prog)
{
struct bpf_prog_stats *stats;
unsigned int flags;
stats = this_cpu_ptr(prog->stats);
flags = u64_stats_update_begin_irqsave(&stats->syncp);
u64_stats_update_begin(&stats->syncp);
u64_stats_inc(&stats->misses);
u64_stats_update_end_irqrestore(&stats->syncp, flags);
u64_stats_update_end(&stats->syncp);
}
/* The logic is similar to bpf_prog_run(), but with an explicit