From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pablo Neira Ayuso Subject: Re: [PATCH] netfilter: xt_recent: avoid high order page allocations Date: Fri, 4 Jan 2013 20:23:16 +0100 Message-ID: <20130104192316.GA17714@1984> References: <1357287519.1678.70.camel@edumazet-glaptop> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev , netfilter-devel@vger.kernel.org, Miroslav Kratochvil , h.reindl@thelounge.net, Dave Jones To: Eric Dumazet Return-path: Received: from mail.us.es ([193.147.175.20]:42975 "EHLO mail.us.es" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754013Ab3ADTXU (ORCPT ); Fri, 4 Jan 2013 14:23:20 -0500 Content-Disposition: inline In-Reply-To: <1357287519.1678.70.camel@edumazet-glaptop> Sender: netfilter-devel-owner@vger.kernel.org List-ID: On Fri, Jan 04, 2013 at 12:18:39AM -0800, Eric Dumazet wrote: > From: Eric Dumazet > > xt_recent can try high order page allocations and this can fail. > > iptables: page allocation failure: order:9, mode:0xc0d0 > > It also wastes about half the allocated space because of kmalloc() > power-of-two roundups and struct recent_table layout. > > Use vmalloc() instead to save space and be less prone to allocation > errors when memory is fragmented. Applied, thanks Eric!