linux-stable/kernel/bpf
Alexei Starovoitov 9f691549f7 bpf: fix struct htab_elem layout
when htab_elem is removed from the bucket list the htab_elem.hash_node.next
field should not be overridden too early otherwise we have a tiny race window
between lookup and delete.
The bug was discovered by manual code analysis and reproducible
only with explicit udelay() in lookup_elem_raw().

Fixes: 6c90598174 ("bpf: pre-allocate hash map elements")
Reported-by: Jonathan Perry <jonperry@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-03-09 13:27:17 -08:00
..
arraymap.c bpf: mark all registered map/prog types as __ro_after_init 2017-02-17 13:40:04 -05:00
bpf_lru_list.c bpf: Make unnecessarily global functions static 2017-01-10 21:00:59 -05:00
bpf_lru_list.h bpf: Add percpu LRU list 2016-11-15 11:50:20 -05:00
cgroup.c bpf: introduce BPF_F_ALLOW_OVERRIDE flag 2017-02-12 21:52:19 -05:00
core.c bpf: make jited programs visible in traces 2017-02-17 13:40:05 -05:00
hashtab.c bpf: fix struct htab_elem layout 2017-03-09 13:27:17 -08:00
helpers.c bpf: rename ARG_PTR_TO_STACK 2017-01-09 16:56:27 -05:00
inode.c bpf: add initial bpf tracepoints 2017-01-25 13:17:47 -05:00
lpm_trie.c bpf: add get_next_key callback to LPM map 2017-03-05 17:55:29 -08:00
Makefile bpf: add a longest prefix match trie map implementation 2017-01-23 16:10:38 -05:00
percpu_freelist.c bpf: introduce percpu_freelist 2016-03-08 15:28:31 -05:00
percpu_freelist.h bpf: introduce percpu_freelist 2016-03-08 15:28:31 -05:00
stackmap.c bpf: mark all registered map/prog types as __ro_after_init 2017-02-17 13:40:04 -05:00
syscall.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/signal.h> 2017-03-02 08:42:29 +01:00
verifier.c bpf: update the comment about the length of analysis 2017-03-01 14:56:50 -08:00