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@xxxxxxxxxx> > --- > v3 changes: > - store module pointer under bpf_trampoline struct Applied.