Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964988AbWLOBfK (ORCPT ); Thu, 14 Dec 2006 20:35:10 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S964985AbWLOBfK (ORCPT ); Thu, 14 Dec 2006 20:35:10 -0500 Received: from 216-99-217-87.dsl.aracnet.com ([216.99.217.87]:46138 "EHLO sous-sol.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964988AbWLOBfH (ORCPT ); Thu, 14 Dec 2006 20:35:07 -0500 Message-Id: <20061215013522.033735000@sous-sol.org> References: <20061215013337.823935000@sous-sol.org> User-Agent: quilt/0.45-1 Date: Thu, 14 Dec 2006 17:33:41 -0800 From: Chris Wright To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , torvalds@osdl.org, akpm@osdl.org, alan@lxorguk.ukuu.org.uk, David Miller , bunk@stusta.de, Al Viro Subject: [patch 04/24] EBTABLES: Deal with the worst-case behaviour in loop checks. Content-Disposition: inline; filename=ebtables-deal-with-the-worst-case-behaviour-in-loop-checks.patch Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1284 Lines: 36 2.6.18-stable review patch. If anyone has any objections, please let us know. ------------------ From: Al Viro No need to revisit a chain we'd already finished with during the check for current hook. It's either instant loop (which we'd just detected) or a duplicate work. Signed-off-by: Al Viro Signed-off-by: David S. Miller Signed-off-by: Chris Wright --- net/bridge/netfilter/ebtables.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- linux-2.6.18.5.orig/net/bridge/netfilter/ebtables.c +++ linux-2.6.18.5/net/bridge/netfilter/ebtables.c @@ -739,7 +739,9 @@ static int check_chainloops(struct ebt_e BUGPRINT("loop\n"); return -1; } - /* this can't be 0, so the above test is correct */ + if (cl_s[i].hookmask & (1 << hooknr)) + goto letscontinue; + /* this can't be 0, so the loop test is correct */ cl_s[i].cs.n = pos + 1; pos = 0; cl_s[i].cs.e = ((void *)e + e->next_offset); -- - 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/