From mboxrd@z Thu Jan 1 00:00:00 1970 From: Charlie Sale Subject: [PATCH] Net: netfilter: Moved vmalloc call to kmalloc call Date: Thu, 2 Nov 2017 19:17:27 -0400 Message-ID: <20171102231727.12610-1-chucks.8090@gmail.com> Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Charlie Sale To: pablo@netfilter.org Return-path: Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org Fixed FIXME comment in code my changing a vmalloc call to a kmalloc call. Thought it would be a good place to start for a first patch. Signed-off-by: Charlie Sale --- net/netfilter/xt_hashlimit.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/netfilter/xt_hashlimit.c b/net/netfilter/xt_hashlimit.c index 5da8746f7b88..4eab1befe03c 100644 --- a/net/netfilter/xt_hashlimit.c +++ b/net/netfilter/xt_hashlimit.c @@ -286,9 +286,9 @@ static int htable_create(struct net *net, struct hashlimit_cfg3 *cfg, if (size < 16) size = 16; } - /* FIXME: don't use vmalloc() here or anywhere else -HW */ - hinfo = vmalloc(sizeof(struct xt_hashlimit_htable) + - sizeof(struct hlist_head) * size); + + hinfo = kmalloc(sizeof(*hinfo) + + sizeof(struct hlist_head) * size, GPT_KERNEL); if (hinfo == NULL) return -ENOMEM; *out_hinfo = hinfo; -- 2.13.6