Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

bpf: Add missing map_get_next_key method to bloom filter map.

Without it, kernel crashes in map_get_next_key().

Fixes: 9330986c0300 ("bpf: Add bloom filter map implementation")
Reported-by: TCS Robot <tcs_robot@tencent.com>
Signed-off-by: Haimin Zhang <tcs_kernel@tencent.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Joanne Koong <joannekoong@fb.com>
Link: https://lore.kernel.org/bpf/1640776802-22421-1-git-send-email-tcs.kernel@gmail.com

authored by

Haimin Zhang and committed by
Alexei Starovoitov
3ccdcee2 b6459415

+6
+6
kernel/bpf/bloom_filter.c
··· 82 82 return -EOPNOTSUPP; 83 83 } 84 84 85 + static int bloom_map_get_next_key(struct bpf_map *map, void *key, void *next_key) 86 + { 87 + return -EOPNOTSUPP; 88 + } 89 + 85 90 static struct bpf_map *bloom_map_alloc(union bpf_attr *attr) 86 91 { 87 92 u32 bitset_bytes, bitset_mask, nr_hash_funcs, nr_bits; ··· 197 192 .map_meta_equal = bpf_map_meta_equal, 198 193 .map_alloc = bloom_map_alloc, 199 194 .map_free = bloom_map_free, 195 + .map_get_next_key = bloom_map_get_next_key, 200 196 .map_push_elem = bloom_map_push_elem, 201 197 .map_peek_elem = bloom_map_peek_elem, 202 198 .map_pop_elem = bloom_map_pop_elem,