aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/bpf/queue_stack_maps.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-10-28 23:17:49 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-10-28 23:17:49 -0400
commit9f51ae62c84a23ade0ba86457d30a30c9db0c50f (patch)
treed71bf5c81f17629d3d1b3131e0842c02bd9a7dd6 /kernel/bpf/queue_stack_maps.c
parent53b3b6bbfde6aae8d1ededc86ad4e0e1e00eb5f8 (diff)
parent747569b0a7c537d680bc94a988be6caad9960488 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) GRO overflow entries are not unlinked properly, resulting in list poison pointers being dereferenced. 2) Fix bridge build with ipv6 disabled, from Nikolay Aleksandrov. 3) Direct packet access and other fixes in BPF from Daniel Borkmann. 4) gred_change_table_def() gets passed the wrong pointer, a pointer to a set of unparsed attributes instead of the attribute itself. From Jakub Kicinski. 5) Allow macsec device to be brought up even if it's lowerdev is down, from Sabrina Dubroca. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: net: diag: document swapped src/dst in udp_dump_one. macsec: let the administrator set UP state even if lowerdev is down macsec: update operstate when lower device changes net: sched: gred: pass the right attribute to gred_change_table_def() ptp: drop redundant kasprintf() to create worker name net: bridge: remove ipv6 zero address check in mcast queries net: Properly unlink GRO packets on overflow. bpf: fix wrong helper enablement in cgroup local storage bpf: add bpf_jit_limit knob to restrict unpriv allocations bpf: make direct packet write unclone more robust bpf: fix leaking uninitialized memory on pop/peek helpers bpf: fix direct packet write into pop/peek helpers bpf: fix cg_skb types to hint access type in may_access_direct_pkt_data bpf: fix direct packet access for flow dissector progs bpf: disallow direct packet access for unpriv in cg_skb bpf: fix test suite to enable all unpriv program types bpf, btf: fix a missing check bug in btf_parse selftests/bpf: add config fragments BPF_STREAM_PARSER and XDP_SOCKETS bpf: devmap: fix wrong interface selection in notifier_call
Diffstat (limited to 'kernel/bpf/queue_stack_maps.c')
-rw-r--r--kernel/bpf/queue_stack_maps.c2
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 }