From bb592b68989c958d16d25f0be909eb977591fad3 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 16 Mar 2022 18:03:43 +0100 Subject: [PATCH] Revert "bpf: Fix possible race in inc_misses_counter" This reverts commit 07058fb18df8285518236e4625f4f61a4c594703 as it breaks the KABI. It will be reverted the next KABI gate in a week. Fixes: efe3167e52a5 ("Linux 5.15.27") Signed-off-by: Greg Kroah-Hartman Change-Id: I9b8f2522971f5747918d9775b869ca6126d18075 --- kernel/bpf/trampoline.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel/bpf/trampoline.c b/kernel/bpf/trampoline.c index 2660fbced9ad..6933a9bfee63 100644 --- a/kernel/bpf/trampoline.c +++ b/kernel/bpf/trampoline.c @@ -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