]> git.karo-electronics.de Git - linux-beck.git/commit
net: filter: add __GFP_NOWARN flag for larger kmem allocs
authorDaniel Borkmann <daniel@iogearbox.net>
Wed, 6 May 2015 14:12:29 +0000 (16:12 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 9 May 2015 21:35:05 +0000 (17:35 -0400)
commit658da9379d0e1aa1e3e40c9b795357ada818b1c8
treed867298c84e4ba073c195b1b8009c2a0d4a243da
parentd9e12f42e58da475379b9080708b94f2095904af
net: filter: add __GFP_NOWARN flag for larger kmem allocs

When seccomp BPF was added, it was discussed to add __GFP_NOWARN
flag for their configuration path as f.e. up to 32K allocations are
more prone to fail under stress. As we're going to reuse BPF API,
add __GFP_NOWARN flags where larger kmalloc() and friends allocations
could fail.

It doesn't make much sense to pass around __GFP_NOWARN everywhere as
an extra argument only for seccomp while we just as well could run
into similar issues for socket filters, where it's not desired to
have a user application throw a WARN() due to allocation failure.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Cc: Nicolas Schichan <nschichan@freebox.fr>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Cc: Kees Cook <keescook@chromium.org>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/filter.c