aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/net/netfilter/x_tables.c
diff options
context:
space:
mode:
authorSean Paul <seanpaul@chromium.org>2017-08-14 13:14:36 -0400
committerSean Paul <seanpaul@chromium.org>2017-08-14 13:14:36 -0400
commit1724c7c0c9494dcbdd7f630f29e1e8427cb231d1 (patch)
treed7c7ad032289cdf0633feee4bd6ec5800b666ca7 /net/netfilter/x_tables.c
parentdrm/atomic: Handle -EDEADLK with out-fences correctly (diff)
parentLinux 4.13-rc5 (diff)
downloadwireguard-linux-1724c7c0c9494dcbdd7f630f29e1e8427cb231d1.tar.xz
wireguard-linux-1724c7c0c9494dcbdd7f630f29e1e8427cb231d1.zip
Merge origin/master into drm-misc-fixes
Backmerge 4.13-rc5 into drm-misc-fixes, it was getting a little stale. Signed-off-by: Sean Paul <seanpaul@chromium.org>
Diffstat (limited to 'net/netfilter/x_tables.c')
-rw-r--r--net/netfilter/x_tables.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c
index 1770c1d9b37f..e1648238a9c9 100644
--- a/net/netfilter/x_tables.c
+++ b/net/netfilter/x_tables.c
@@ -1003,14 +1003,10 @@ struct xt_table_info *xt_alloc_table_info(unsigned int size)
if ((SMP_ALIGN(size) >> PAGE_SHIFT) + 2 > totalram_pages)
return NULL;
- if (sz <= (PAGE_SIZE << PAGE_ALLOC_COSTLY_ORDER))
- info = kmalloc(sz, GFP_KERNEL | __GFP_NOWARN | __GFP_NORETRY);
- if (!info) {
- info = __vmalloc(sz, GFP_KERNEL | __GFP_NOWARN | __GFP_NORETRY,
- PAGE_KERNEL);
- if (!info)
- return NULL;
- }
+ info = kvmalloc(sz, GFP_KERNEL);
+ if (!info)
+ return NULL;
+
memset(info, 0, sizeof(*info));
info->size = size;
return info;