diff options
author | David S. Miller <davem@davemloft.net> | 2018-10-27 07:41:49 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-10-27 07:41:49 +0300 |
commit | 6788fac82001ed1944b5da976bcec4a7b9accf51 (patch) | |
tree | b003137f9b8cfceac884409216f61cbb2a2f4ddd /kernel/bpf/queue_stack_maps.c | |
parent | 345671ea0f9258f410eb057b9ced9cefbbe5dc78 (diff) | |
parent | d8fd9e106fbc291167ebb675ad69234597d0fd98 (diff) | |
download | linux-6788fac82001ed1944b5da976bcec4a7b9accf51.tar.xz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf
Daniel Borkmann says:
====================
pull-request: bpf 2018-10-27
The following pull-request contains BPF updates for your *net* tree.
The main changes are:
1) Fix toctou race in BTF header validation, from Martin and Wenwen.
2) Fix devmap interface comparison in notifier call which was
neglecting netns, from Taehee.
3) Several fixes in various places, for example, correcting direct
packet access and helper function availability, from Daniel.
4) Fix BPF kselftest config fragment to include af_xdp and sockmap,
from Naresh.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
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) raw_spin_lock_irqsave(&qs->lock, flags); if (queue_stack_map_is_empty(qs)) { + memset(value, 0, qs->map.value_size); err = -ENOENT; goto out; } @@ -151,6 +152,7 @@ static int __stack_map_get(struct bpf_map *map, void *value, bool delete) raw_spin_lock_irqsave(&qs->lock, flags); if (queue_stack_map_is_empty(qs)) { + memset(value, 0, qs->map.value_size); err = -ENOENT; goto out; } |