diff options
author | Stanislav Fomichev <sdf@google.com> | 2020-10-03 03:25:44 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2020-10-03 05:21:25 +0300 |
commit | 1028ae4069991e26d1522e957939fb61d2da1d12 (patch) | |
tree | 3515e99b6d9dafa966d02e423f092d6379d7998f /net/xdp | |
parent | fb91db01c652ba9391f67c21db2d5260448b3efd (diff) | |
download | linux-1028ae4069991e26d1522e957939fb61d2da1d12.tar.xz |
bpf: Deref map in BPF_PROG_BIND_MAP when it's already used
We are missing a deref for the case when we are doing BPF_PROG_BIND_MAP
on a map that's being already held by the program.
There is 'if (ret) bpf_map_put(map)' below which doesn't trigger
because we don't consider this an error.
Let's add missing bpf_map_put() for this specific condition.
Fixes: ef15314aa5de ("bpf: Add BPF_PROG_BIND_MAP syscall")
Reported-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/20201003002544.3601440-1-sdf@google.com
Diffstat (limited to 'net/xdp')
0 files changed, 0 insertions, 0 deletions