From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH v3 net-next-2.6] netfilter: x_tables: dont block BH while reading counters Date: Thu, 16 Dec 2010 09:57:09 -0800 Message-ID: <20101216095709.18f16c53@nehalam> References: <1292337974.9155.68.camel@firesoul.comx.local> <1292340702.5934.5.camel@edumazet-laptop> <1292342958.9155.91.camel@firesoul.comx.local> <1292343855.5934.27.camel@edumazet-laptop> <1292508266.31289.12.camel@firesoul.comx.local> <1292508733.2883.152.camel@edumazet-laptop> <1292509489.31289.20.camel@firesoul.comx.local> <1292509775.2883.187.camel@edumazet-laptop> <1292511761.2883.236.camel@edumazet-laptop> <1292515625.2883.336.camel@edumazet-laptop> <1292518436.2883.393.camel@edumazet-laptop> <20101216093149.71f082c7@nehalam> <1292521986.2883.472.camel@edumazet-laptop> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Jesper Dangaard Brouer , Patrick McHardy , Arnaldo Carvalho de Melo , Steven Rostedt , Alexander Duyck , netfilter-devel , netdev , Peter P Waskiewicz Jr To: Eric Dumazet Return-path: Received: from mail.vyatta.com ([76.74.103.46]:34022 "EHLO mail.vyatta.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752284Ab0LPR5M (ORCPT ); Thu, 16 Dec 2010 12:57:12 -0500 In-Reply-To: <1292521986.2883.472.camel@edumazet-laptop> Sender: netfilter-devel-owner@vger.kernel.org List-ID: On Thu, 16 Dec 2010 18:53:06 +0100 Eric Dumazet wrote: > @@ -759,7 +742,7 @@ static struct xt_counters *alloc_counters(const struct xt_table *table) > * about). > */ > countersize = sizeof(struct xt_counters) * private->number; > - counters = vmalloc(countersize); > + counters = vzalloc(countersize); > > if (counters == NULL) > return ERR_PTR(-ENOMEM); > @@ -1007,7 +990,7 @@ static int __do_replace(struct net *net, const char *name, > struct arpt_entry *iter; > > ret = 0; > - counters = vmalloc(num_counters * sizeof(struct xt_counters)); > + counters = vzalloc(num_counters * sizeof(struct xt_counters)); > if (!counters) { > ret = -ENOMEM; > goto out; This seems like a different and unrelated change. --