]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS,bpf: Fix using smp_processor_id() in preemptible splat.
authorDavid Daney <david.daney@cavium.com>
Fri, 18 Aug 2017 23:40:31 +0000 (16:40 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 Aug 2017 17:31:34 +0000 (10:31 -0700)
commitbcb2f72d7b025517f9fa06e732fdc142c6c21d3a
treee4e5f9774658c3af9b9466b96e1c0f459b1c93f0
parent85dbdca0e26b751c924a893b510b8ead883f4f8c
MIPS,bpf: Fix using smp_processor_id() in preemptible splat.

If the kernel is configured with preemption enabled we were getting
warning stack traces for use of current_cpu_type().

Fix by moving the test between preempt_disable()/preempt_enable() and
caching the results of the CPU type tests for use during code
generation.

Signed-off-by: David Daney <david.daney@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/mips/net/ebpf_jit.c