diff options
| author | Peng Sun <[email protected]> | 2019-02-26 14:15:37 +0000 |
|---|---|---|
| committer | Daniel Borkmann <[email protected]> | 2019-02-26 18:08:30 +0000 |
| commit | 781e62823cb81b972dc8652c1827205cda2ac9ac (patch) | |
| tree | 7f97f6e117edfd62175df6776a0c208c9325988d /tools/perf/scripts/python/mem-phys-addr.py | |
| parent | net: avoid use IPCB in cipso_v4_error (diff) | |
| download | kernel-781e62823cb81b972dc8652c1827205cda2ac9ac.tar.gz kernel-781e62823cb81b972dc8652c1827205cda2ac9ac.zip | |
bpf: decrease usercnt if bpf_map_new_fd() fails in bpf_map_get_fd_by_id()
In bpf/syscall.c, bpf_map_get_fd_by_id() use bpf_map_inc_not_zero()
to increase the refcount, both map->refcnt and map->usercnt. Then, if
bpf_map_new_fd() fails, should handle map->usercnt too.
Fixes: bd5f5f4ecb78 ("bpf: Add BPF_MAP_GET_FD_BY_ID")
Signed-off-by: Peng Sun <[email protected]>
Acked-by: Martin KaFai Lau <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/mem-phys-addr.py')
0 files changed, 0 insertions, 0 deletions
