diff options
Diffstat (limited to 'kernel/bpf/queue_stack_maps.c')
| -rw-r--r-- | kernel/bpf/queue_stack_maps.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/bpf/queue_stack_maps.c b/kernel/bpf/queue_stack_maps.c index 12a93fb37449..8bbd72d3a121 100644 --- a/kernel/bpf/queue_stack_maps.c +++ b/kernel/bpf/queue_stack_maps.c | |||
| @@ -122,6 +122,7 @@ static int __queue_map_get(struct bpf_map *map, void *value, bool delete) | |||
| 122 | raw_spin_lock_irqsave(&qs->lock, flags); | 122 | raw_spin_lock_irqsave(&qs->lock, flags); |
| 123 | 123 | ||
| 124 | if (queue_stack_map_is_empty(qs)) { | 124 | if (queue_stack_map_is_empty(qs)) { |
| 125 | memset(value, 0, qs->map.value_size); | ||
| 125 | err = -ENOENT; | 126 | err = -ENOENT; |
| 126 | goto out; | 127 | goto out; |
| 127 | } | 128 | } |
| @@ -151,6 +152,7 @@ static int __stack_map_get(struct bpf_map *map, void *value, bool delete) | |||
| 151 | raw_spin_lock_irqsave(&qs->lock, flags); | 152 | raw_spin_lock_irqsave(&qs->lock, flags); |
| 152 | 153 | ||
| 153 | if (queue_stack_map_is_empty(qs)) { | 154 | if (queue_stack_map_is_empty(qs)) { |
| 155 | memset(value, 0, qs->map.value_size); | ||
| 154 | err = -ENOENT; | 156 | err = -ENOENT; |
| 155 | goto out; | 157 | goto out; |
| 156 | } | 158 | } |
