]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: do not test for PCPU_MIN_UNIT_SIZE before percpu allocations
authorDaniel Borkmann <daniel@iogearbox.net>
Tue, 17 Oct 2017 14:55:54 +0000 (16:55 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 19 Oct 2017 12:13:50 +0000 (13:13 +0100)
commit2bdd2d7279f7aa717eb25427b0eefc8ece10ba1c
treec67f4312dd0af8422b5400b0442583660535df12
parente26394668226ab710376504518945725edc3f9ef
bpf: do not test for PCPU_MIN_UNIT_SIZE before percpu allocations

PCPU_MIN_UNIT_SIZE is an implementation detail of the percpu
allocator. Given we support __GFP_NOWARN now, lets just let
the allocation request fail naturally instead. The two call
sites from BPF mistakenly assumed __GFP_NOWARN would work, so
no changes needed to their actual __alloc_percpu_gfp() calls
which use the flag already.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
kernel/bpf/arraymap.c
kernel/bpf/hashtab.c