]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Fix preempt_enable_no_resched() abuse
authorPeter Zijlstra <peterz@infradead.org>
Tue, 23 Apr 2019 19:55:59 +0000 (21:55 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 26 Apr 2019 00:20:06 +0000 (17:20 -0700)
commit01250ee2d4b7e4771695803eef884b72ec255afa
treebda2ebb26824837370940415fa1857bb29d28d06
parent219e0d9ef26e3f5b614966993856897c6b43de0a
bpf: Fix preempt_enable_no_resched() abuse

Unless the very next line is schedule(), or implies it, one must not use
preempt_enable_no_resched(). It can cause a preemption to go missing and
thereby cause arbitrary delays, breaking the PREEMPT=y invariant.

Cc: Roman Gushchin <guro@fb.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
include/linux/bpf.h