From patchwork Fri Oct 2 01:17:10 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gregkh@suse.de X-Patchwork-Id: 34799 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 71BABB7BC8 for ; Fri, 2 Oct 2009 11:49:00 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756787AbZJBBdp (ORCPT ); Thu, 1 Oct 2009 21:33:45 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756778AbZJBBdo (ORCPT ); Thu, 1 Oct 2009 21:33:44 -0400 Received: from kroah.org ([198.145.64.141]:33314 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756683AbZJBBdj (ORCPT ); Thu, 1 Oct 2009 21:33:39 -0400 Received: from localhost (c-98-246-45-209.hsd1.or.comcast.net [98.246.45.209]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by coco.kroah.org (Postfix) with ESMTPSA id F313648E4D; Thu, 1 Oct 2009 18:33:42 -0700 (PDT) X-Mailbox-Line: From gregkh@mini.kroah.org Thu Oct 1 18:24:19 2009 Message-Id: <20091002012419.543259734@mini.kroah.org> User-Agent: quilt/0.48-1 Date: Thu, 01 Oct 2009 18:17:10 -0700 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: stable-review@kernel.org, torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, netdev@vger.kernel.org, netfilter-devel@vger.kernel.org, Patrick McHardy , davem@davemloft.net, Alexey Dobriyan , Pablo Neira Ayuso Subject: [082/136] netfilter: nf_conntrack: netns fix re reliable conntrack event delivery References: <20091002011548.335611824@mini.kroah.org> Content-Disposition: inline; filename=netfilter-nf_conntrack-netns-fix-re-reliable-conntrack-event-delivery.patch Lines: 47 In-Reply-To: <20091002012911.GA18542@kroah.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 2.6.31-stable review patch. If anyone has any objections, please let us know. ------------------ From: Patrick McHardy netfilter: nf_conntrack: netns fix re reliable conntrack event delivery Upstream commit ee254fa4: Conntracks in netns other than init_net dying list were never killed. Signed-off-by: Alexey Dobriyan Acked-by: Pablo Neira Ayuso Signed-off-by: Patrick McHardy Signed-off-by: Greg Kroah-Hartman --- net/netfilter/nf_conntrack_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c @@ -1089,14 +1089,14 @@ void nf_conntrack_flush_report(struct ne } EXPORT_SYMBOL_GPL(nf_conntrack_flush_report); -static void nf_ct_release_dying_list(void) +static void nf_ct_release_dying_list(struct net *net) { struct nf_conntrack_tuple_hash *h; struct nf_conn *ct; struct hlist_nulls_node *n; spin_lock_bh(&nf_conntrack_lock); - hlist_nulls_for_each_entry(h, n, &init_net.ct.dying, hnnode) { + hlist_nulls_for_each_entry(h, n, &net->ct.dying, hnnode) { ct = nf_ct_tuplehash_to_ctrack(h); /* never fails to remove them, no listeners at this point */ nf_ct_kill(ct); @@ -1115,7 +1115,7 @@ static void nf_conntrack_cleanup_net(str { i_see_dead_people: nf_ct_iterate_cleanup(net, kill_all, NULL); - nf_ct_release_dying_list(); + nf_ct_release_dying_list(net); if (atomic_read(&net->ct.count) != 0) { schedule(); goto i_see_dead_people;