Since commit 509db2833e0d ("bpf: error handling when map_lookup_elem
isn't supported") when map lookup isn't supported, the map_lookup_elem
function should return ERR_PTR(-EOPNOTSUPP).
Fixes: f1a2e44a3aec ("bpf: add queue and stack maps")
Signed-off-by: Prashant Bhole <[email protected]>
---
kernel/bpf/queue_stack_maps.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/bpf/queue_stack_maps.c b/kernel/bpf/queue_stack_maps.c
index b384ea9f3254..8fd19b06da66 100644
--- a/kernel/bpf/queue_stack_maps.c
+++ b/kernel/bpf/queue_stack_maps.c
@@ -240,7 +240,7 @@ static int queue_stack_map_push_elem(struct bpf_map *map,
void *value,
/* Called from syscall or from eBPF program */
static void *queue_stack_map_lookup_elem(struct bpf_map *map, void *key)
{
- return NULL;
+ return ERR_PTR(-EOPNOTSUPP);
}
/* Called from syscall or from eBPF program */
--
2.17.2