Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759084AbZDQLRe (ORCPT ); Fri, 17 Apr 2009 07:17:34 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756705AbZDQLRV (ORCPT ); Fri, 17 Apr 2009 07:17:21 -0400 Received: from stinky.trash.net ([213.144.137.162]:51123 "EHLO stinky.trash.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754601AbZDQLRU (ORCPT ); Fri, 17 Apr 2009 07:17:20 -0400 Message-ID: <49E86539.9070408@trash.net> Date: Fri, 17 Apr 2009 13:17:13 +0200 From: Patrick McHardy User-Agent: Mozilla-Thunderbird 2.0.0.19 (X11/20090103) MIME-Version: 1.0 To: Eric Dumazet CC: Stephen Hemminger , paulmck@linux.vnet.ibm.com, David Miller , torvalds@linux-foundation.org, jeff.chua.linux@gmail.com, paulus@samba.org, mingo@elte.hu, laijs@cn.fujitsu.com, jengelh@medozas.de, r000n@r000n.net, linux-kernel@vger.kernel.org, netfilter-devel@vger.kernel.org, netdev@vger.kernel.org, benh@kernel.crashing.org Subject: Re: [PATCH] netfilter: per-cpu spin-lock with recursion (v0.8) References: <20090415170111.6e1ca264@nehalam> <49E72E83.50702@trash.net> <20090416.153354.170676392.davem@davemloft.net> <20090416234955.GL6924@linux.vnet.ibm.com> <20090416165233.5d8bbfb5@nehalam> <49E81B9D.3030807@cosmosbay.com> In-Reply-To: <49E81B9D.3030807@cosmosbay.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1047 Lines: 25 Eric Dumazet wrote: > Stephen Hemminger a ?crit : >> This version of x_tables (ip/ip6/arp) locking uses a per-cpu >> recursive lock that can be nested. It is sort of like existing kernel_lock, >> rwlock_t and even old 2.4 brlock. >> >> ... > I like this version 8 of the patch, as it mixes all ideas we had, > but have two questions. > > Previous netfilter code (and 2.6.30-rc2 one too) disable BH, not only preemption. > > I see xt_table_info_lock_all(void) does block BH, so this one is safe. > > I let Patrick or other tell us if its safe to run ipt_do_table() > with preemption disabled but BH enabled, I really dont know. No, on jumps the return position is stored in the per-cpu copy of the ruleset and we must prevent BH context corrupting the value of something running in process context. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/