1
0
Fork 0
remarkable-linux/kernel/bpf
Eric Dumazet 2a8bc5316a bpf: add schedule points in percpu arrays management
[ upstream commit 32fff239de ]

syszbot managed to trigger RCU detected stalls in
bpf_array_free_percpu()

It takes time to allocate a huge percpu map, but even more time to free
it.

Since we run in process context, use cond_resched() to yield cpu if
needed.

Fixes: a10423b87a ("bpf: introduce BPF_MAP_TYPE_PERCPU_ARRAY map")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-11 16:21:35 +01:00
..
Makefile bpf: introduce percpu_freelist 2016-03-08 15:28:31 -05:00
arraymap.c bpf: add schedule points in percpu arrays management 2018-03-11 16:21:35 +01:00
core.c bpf: fix divides by zero 2018-01-31 12:55:57 +01:00
hashtab.c bpf: don't trigger OOM killer under pressure with map alloc 2017-07-05 14:40:21 +02:00
helpers.c bpf: direct packet write and access for helpers for clsact progs 2016-09-20 23:32:11 -04:00
inode.c fs: Replace CURRENT_TIME with current_time() for inode timestamps 2016-09-27 21:06:21 -04:00
percpu_freelist.c bpf: fix lockdep splat 2017-12-14 09:28:23 +01:00
percpu_freelist.h bpf: introduce percpu_freelist 2016-03-08 15:28:31 -05:00
stackmap.c bpf: fix wrong exposure of map_flags into fdinfo for lpm 2018-03-11 16:21:34 +01:00
syscall.c bpf: move fixup_bpf_calls() function 2018-01-17 09:38:55 +01:00
verifier.c bpf: reject stores into ctx via st and xadd 2018-01-31 12:55:57 +01:00