]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Dont iterate over possible CPUs with interrupts disabled
authorThomas Gleixner <tglx@linutronix.de>
Mon, 24 Feb 2020 14:01:40 +0000 (15:01 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 25 Feb 2020 00:18:20 +0000 (16:18 -0800)
commit2f4014621769a1c9241f7b3682a3f8580707c6ba
treebb943982c132511cddfc78844fa10bfbb35dc50c
parent99b1aedccaa0e4ff75be3fcc551aaed5055ef7d8
bpf: Dont iterate over possible CPUs with interrupts disabled

pcpu_freelist_populate() is disabling interrupts and then iterates over the
possible CPUs. The reason why this disables interrupts is to silence
lockdep because the invoked ___pcpu_freelist_push() takes spin locks.

Neither the interrupt disabling nor the locking are required in this
function because it's called during initialization and the resulting map is
not yet visible to anything.

Split out the actual push assignement into an inline, call it from the loop
and remove the interrupt disable.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200224145643.365930116@linutronix.de
kernel/bpf/percpu_freelist.c