[PATCH for v4.9 LTS 28/86] bpf: don't trigger OOM killer under pressure with map alloc

2017-06-17 Thread Levin, Alexander (Sasha Levin)
From: Daniel Borkmann [ Upstream commit d407bd25a204bd66b7346dde24bd3d37ef0e0b05 ] This patch adds two helpers, bpf_map_area_alloc() and bpf_map_area_free(), that are to be used for map allocations. Using kmalloc() for very large allocations can cause excessive work within

[PATCH for v4.9 LTS 28/86] bpf: don't trigger OOM killer under pressure with map alloc

2017-06-17 Thread Levin, Alexander (Sasha Levin)
From: Daniel Borkmann [ Upstream commit d407bd25a204bd66b7346dde24bd3d37ef0e0b05 ] This patch adds two helpers, bpf_map_area_alloc() and bpf_map_area_free(), that are to be used for map allocations. Using kmalloc() for very large allocations can cause excessive work within the page allocator,