Thread (2 messages) 2 messages, 2 authors, 2021-03-27

Re: [PATCHv3 bpf] bpf: Take module reference for trampoline in module

From: Alexei Starovoitov <hidden>
Date: 2021-03-27 03:20:38
Also in: bpf

On Fri, Mar 26, 2021 at 11:59:00AM +0100, Jiri Olsa wrote:
Currently module can be unloaded even if there's a trampoline
register in it. It's easily reproduced by running in parallel:

  # while :; do ./test_progs -t module_attach; done
  # while :; do rmmod bpf_testmod; sleep 0.5; done

Taking the module reference in case the trampoline's ip is
within the module code. Releasing it when the trampoline's
ip is unregistered.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 v3 changes:
   - store module pointer under bpf_trampoline struct
Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help