]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Replace cant_sleep() with cant_migrate()
authorThomas Gleixner <tglx@linutronix.de>
Mon, 24 Feb 2020 14:01:42 +0000 (15:01 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 25 Feb 2020 00:20:09 +0000 (16:20 -0800)
commitfc8c67fc518def8db84b57686824d563dfc92fd8
treefa994e5de8abf9a7007d9a11d67460b78cdefa2a
parenta39175617664d777160563aaa026335e3b7ed586
bpf: Replace cant_sleep() with cant_migrate()

As already discussed in the previous change which introduced
BPF_RUN_PROG_PIN_ON_CPU() BPF only requires to disable migration to
guarantee per CPUness.

If RT substitutes the preempt disable based migration protection then the
cant_sleep() check will obviously trigger as preemption is not disabled.

Replace it by cant_migrate() which maps to cant_sleep() on a non RT kernel
and will verify that migration is disabled on a full RT kernel.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200224145643.583038889@linutronix.de
include/linux/filter.h