Peng Sun
ebf233fd40
bpf: drop refcount if bpf_map_new_fd() fails in map_create()
...
[ Upstream commit 352d20d611414715353ee65fc206ee57ab1a6984 ]
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 <sironhide0null@gmail.com>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-12-05 15:38:00 +01:00
..
2019-12-05 15:38:00 +01:00
2019-08-09 17:53:37 +02:00
2017-08-22 18:43:23 -07:00
2019-02-12 19:46:09 +01:00
2019-11-20 17:59:52 +01:00
2017-11-02 11:10:55 +01:00
2019-09-19 09:08:04 +02:00
2019-10-07 18:55:09 +02:00
2019-10-11 18:18:36 +02:00
2019-06-11 12:21:48 +02:00
2019-12-01 09:13:17 +01:00
2019-05-31 06:47:33 -07:00
2019-12-01 09:14:02 +01:00
2019-10-11 18:18:46 +02:00
2019-11-06 12:43:20 +01:00
2018-01-10 09:31:17 +01:00
2018-02-16 20:23:05 +01:00
2017-11-02 11:10:55 +01:00
2018-09-26 08:38:09 +02:00
2018-05-30 07:52:39 +02:00
2017-09-03 20:21:24 -04:00
2019-05-31 06:47:25 -07:00
2019-12-01 09:14:03 +01:00
2018-11-13 11:15:08 -08:00
2017-11-02 11:10:55 +01:00
2018-05-16 10:10:26 +02:00
2017-07-31 13:09:49 +02:00
2019-11-24 08:23:08 +01:00
2018-01-17 09:45:27 +01:00
2019-07-31 07:28:58 +02:00
2018-08-03 07:50:38 +02:00
2017-11-02 11:10:55 +01:00
2019-10-11 18:18:42 +02:00
2017-11-02 11:10:55 +01:00
2019-08-09 17:53:36 +02:00
2017-09-23 16:50:20 -04:00
2019-12-05 15:37:52 +01:00
2017-11-02 11:10:55 +01:00
2019-05-10 17:53:15 +02:00
2017-12-20 10:10:18 +01:00
2019-04-20 09:15:05 +02:00
2018-12-05 19:41:17 +01:00
2019-09-21 07:15:38 +02:00
2017-11-02 11:10:55 +01:00
2018-08-03 07:50:22 +02:00
2019-11-24 08:23:15 +01:00
2017-11-02 11:10:55 +01:00
2017-09-08 18:26:51 -07:00
2019-11-20 17:59:56 +01:00
2018-08-03 07:50:21 +02:00
2019-06-19 08:20:56 +02:00
2019-01-13 10:01:02 +01:00
2019-09-16 08:20:46 +02:00
2019-07-31 07:28:39 +02:00
2019-10-17 13:43:19 -07:00
2017-10-03 17:54:26 -07:00
2019-07-31 07:28:21 +02:00
2017-08-21 12:47:31 -07:00
2019-07-10 09:54:38 +02:00
2017-11-02 11:10:55 +01:00
2019-03-13 14:03:20 -07:00
2018-04-24 09:36:22 +02:00
2018-05-22 18:54:04 +02:00
2019-11-20 17:59:52 +01:00
2019-02-12 19:46:13 +01:00
2017-10-04 10:53:54 +02:00
2017-11-02 11:10:55 +01:00
2018-08-15 18:12:47 +02:00
2018-09-05 09:26:36 +02:00
2017-11-02 11:10:55 +01:00
2019-06-15 11:54:52 +02:00
2017-11-02 11:10:55 +01:00
2019-06-15 11:54:51 +02:00
2017-12-25 14:26:21 +01:00
2017-07-25 13:04:45 -07:00
2018-05-09 09:51:50 +02:00
2017-12-20 10:10:18 +01:00
2017-09-08 18:26:50 -07:00
2017-08-29 15:14:38 +02:00
2018-09-09 19:56:00 +02:00
2018-09-09 19:56:00 +02:00
2018-09-05 09:26:42 +02:00
2018-09-05 09:26:42 +02:00
2017-11-06 12:26:49 -08:00
2018-09-05 09:26:42 +02:00