diff options
author | Anay Wadhera <awadhera@berkeley.edu> | 2021-05-20 21:49:58 -0700 |
---|---|---|
committer | Michael Bestas <mkbestas@lineageos.org> | 2022-04-19 00:49:40 +0300 |
commit | 6e5270c40005b8f29dc8e0608829f35789afc13d (patch) | |
tree | 385d6de5953d848ab7f3de25217f08649d8151d1 /kernel/bpf/arraymap.c | |
parent | 084fb699df86b35e81adf21354297f2c6c239648 (diff) |
Revert "bpf: map_get_next_key to return first key on NULL"
This reverts commit ea7c24c78551c8b3e6a7e9824e5ad8ba6224f5fe.
Signed-off-by: Chatur27 <jasonbright2709@gmail.com>
Diffstat (limited to 'kernel/bpf/arraymap.c')
-rw-r--r-- | kernel/bpf/arraymap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/bpf/arraymap.c b/kernel/bpf/arraymap.c index 0eb11b4ac4c7..3608fa1aec8a 100644 --- a/kernel/bpf/arraymap.c +++ b/kernel/bpf/arraymap.c @@ -102,7 +102,7 @@ static void *array_map_lookup_elem(struct bpf_map *map, void *key) static int array_map_get_next_key(struct bpf_map *map, void *key, void *next_key) { struct bpf_array *array = container_of(map, struct bpf_array, map); - u32 index = key ? *(u32 *)key : U32_MAX; + u32 index = *(u32 *)key; u32 *next = (u32 *)next_key; if (index >= array->map.max_entries) { |