mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 22:02:02 +00:00
bpf: Fix preempt_enable_no_resched() abuse
[ Upstream commit 0edd6b64d1
]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
aea54f6135
commit
c1528193f6
1 changed files with 1 additions and 1 deletions
|
@ -400,7 +400,7 @@ int bpf_prog_array_copy(struct bpf_prog_array __rcu *old_array,
|
|||
} \
|
||||
_out: \
|
||||
rcu_read_unlock(); \
|
||||
preempt_enable_no_resched(); \
|
||||
preempt_enable(); \
|
||||
_ret; \
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in a new issue