diff options
author | Michal Hocko <[email protected]> | 2018-01-30 11:30:11 -0800 |
---|---|---|
committer | Pablo Neira Ayuso <[email protected]> | 2018-02-02 12:45:16 +0100 |
commit | 0537250fdc6c876ed4cbbe874c739aebef493ee2 (patch) | |
tree | 849e9a9c317dcbb325eda7d8a81bc3615f473470 /tools/perf/scripts/python/call-graph-from-sql.py | |
parent | 743ffffefac1c670c6618742c923f6275d819604 (diff) |
netfilter: x_tables: make allocation less aggressive
syzbot has noticed that xt_alloc_table_info can allocate a lot of memory.
This is an admin only interface but an admin in a namespace is sufficient
as well. eacd86ca3b03 ("net/netfilter/x_tables.c: use kvmalloc() in
xt_alloc_table_info()") has changed the opencoded kmalloc->vmalloc
fallback into kvmalloc. It has dropped __GFP_NORETRY on the way because
vmalloc has simply never fully supported __GFP_NORETRY semantic. This is
still the case because e.g. page tables backing the vmalloc area are
hardcoded GFP_KERNEL.
Revert back to __GFP_NORETRY as a poors man defence against excessively
large allocation request here. We will not rule out the OOM killer
completely but __GFP_NORETRY should at least stop the large request in
most cases.
[[email protected]: coding-style fixes]
Fixes: eacd86ca3b03 ("net/netfilter/x_tables.c: use kvmalloc() in xt_alloc_tableLink: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Michal Hocko <[email protected]>
Acked-by: Florian Westphal <[email protected]>
Reviewed-by: Andrew Morton <[email protected]>
Cc: David S. Miller <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Pablo Neira Ayuso <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-sql.py')
0 files changed, 0 insertions, 0 deletions