diff options
| author | Peng Sun <[email protected]> | 2019-02-27 14:36:25 +0000 |
|---|---|---|
| committer | Daniel Borkmann <[email protected]> | 2019-03-01 15:04:29 +0000 |
| commit | 352d20d611414715353ee65fc206ee57ab1a6984 (patch) | |
| tree | c856f1153a8c8551c974aa908088bdd1fe6499ac /tools/perf/scripts/python/mem-phys-addr.py | |
| parent | bpf: decrease usercnt if bpf_map_new_fd() fails in bpf_map_get_fd_by_id() (diff) | |
| download | kernel-352d20d611414715353ee65fc206ee57ab1a6984.tar.gz kernel-352d20d611414715353ee65fc206ee57ab1a6984.zip | |
bpf: drop refcount if bpf_map_new_fd() fails in map_create()
In bpf/syscall.c, map_create() first set map->usercnt to 1, a file
descriptor is supposed to return to userspace. When bpf_map_new_fd()
fails, drop the refcount.
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: Alexei Starovoitov <[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
