diff options
author | Michal Hocko <[email protected]> | 2018-01-31 09:16:56 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <[email protected]> | 2018-02-08 12:36:15 +0100 |
commit | fd2c19b2a28bb574b3914466a68ef830212d5cf7 (patch) | |
tree | 92e7ac79d41714def75a8a3e4c627a3513c85653 | |
parent | 5c487bb9adddbc1d23433e09d2548759375c2b52 (diff) |
netfilter: x_tables: remove size check
Back in 2002 vmalloc used to BUG on too large sizes. We are much better
behaved these days and vmalloc simply returns NULL for those. Remove the
check as it simply not needed and the comment is even misleading.
Link: http://lkml.kernel.org/r/[email protected]
Suggested-by: Andrew Morton <[email protected]>
Signed-off-by: Michal Hocko <[email protected]>
Reviewed-by: Andrew Morton <[email protected]>
Cc: Florian Westphal <[email protected]>
Cc: David S. Miller <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Pablo Neira Ayuso <[email protected]>
-rw-r--r-- | net/netfilter/x_tables.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c index 2f685ee1f9c8..97e06a04c0d4 100644 --- a/net/netfilter/x_tables.c +++ b/net/netfilter/x_tables.c @@ -1004,10 +1004,6 @@ struct xt_table_info *xt_alloc_table_info(unsigned int size) if (sz < sizeof(*info)) return NULL; - /* Pedantry: prevent them from hitting BUG() in vmalloc.c --RR */ - if ((size >> PAGE_SHIFT) + 2 > totalram_pages) - return NULL; - /* __GFP_NORETRY is not fully supported by kvmalloc but it should * work reasonably well if sz is too large and bail out rather * than shoot all processes down before realizing there is nothing |