mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
bpf: Fix map-in-map checking in the verifier
In check_map_func_compatibility(), a 'break' has been accidentally
removed for the BPF_MAP_TYPE_ARRAY_OF_MAPS and BPF_MAP_TYPE_HASH_OF_MAPS
cases. This patch adds it back.
Fixes: 174a79ff95 ("bpf: sockmap with sk redirect support")
Cc: John Fastabend <[email protected]>
Signed-off-by: Martin KaFai Lau <[email protected]>
Acked-by: Alexei Starovoitov <[email protected]>
Acked-by: John Fastabend <[email protected]>
Acked-by: Daniel Borkmann <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
bd1cc1a729
commit
16a4362573
1 changed files with 1 additions and 0 deletions
|
|
@ -1523,6 +1523,7 @@ static int check_map_func_compatibility(struct bpf_map *map, int func_id)
|
|||
case BPF_MAP_TYPE_HASH_OF_MAPS:
|
||||
if (func_id != BPF_FUNC_map_lookup_elem)
|
||||
goto error;
|
||||
break;
|
||||
case BPF_MAP_TYPE_SOCKMAP:
|
||||
if (func_id != BPF_FUNC_sk_redirect_map &&
|
||||
func_id != BPF_FUNC_sock_map_update &&
|
||||
|
|
|
|||
Loading…
Reference in a new issue