diff options
author | Alexei Starovoitov <ast@kernel.org> | 2020-01-20 19:22:31 -0800 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2020-01-22 11:31:21 +0100 |
commit | 05d57f1793fb250c85028c9952c3720010baa853 (patch) | |
tree | 746224e9acb03427aba28b7bb61e160379115f52 /tools | |
parent | 43a825afc91e2b06af1e8e7422198e759c2c5e20 (diff) | |
download | linux-05d57f1793fb250c85028c9952c3720010baa853.tar.bz2 |
bpf: Fix trampoline usage in preempt
Though the second half of trampoline page is unused a task could be
preempted in the middle of the first half of trampoline and two
updates to trampoline would change the code from underneath the
preempted task. Hence wait for tasks to voluntarily schedule or go
to userspace. Add similar wait before freeing the trampoline.
Fixes: fec56f5890d9 ("bpf: Introduce BPF trampoline")
Reported-by: Jann Horn <jannh@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Paul E. McKenney <paulmck@kernel.org>
Link: https://lore.kernel.org/bpf/20200121032231.3292185-1-ast@kernel.org
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions