bpf: Need to call bpf_prog_uncharge_memlock from bpf_prog_put
Currently, is only called from __prog_put_rcu in the bpf_prog_release
path. Need this to call this from bpf_prog_put also to get correct
accounting.
Fixes: aaac3ba95e
("bpf: charge user for creation of BPF maps and programs")
Signed-off-by: Tom Herbert <tom@herbertland.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Родитель
a302afe980
Коммит
ac00737f4e
|
@ -520,6 +520,7 @@ void bpf_prog_put(struct bpf_prog *prog)
|
|||
{
|
||||
if (atomic_dec_and_test(&prog->aux->refcnt)) {
|
||||
free_used_maps(prog->aux);
|
||||
bpf_prog_uncharge_memlock(prog);
|
||||
bpf_prog_free(prog);
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче