All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber-dcUjhNyLwpNeoWH0uzbU5w@public.gmane.org>
To: Mariusz Kozlowski <m.kozlowski-NWF1p15JEu3VItvQsEIGlw@public.gmane.org>
Cc: Eric Dumazet <dada1-fPLkHRcR87vqlBn2x/YWAg@public.gmane.org>,
	Kernel Testers List
	<kernel-testers-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Netfilter Development Mailinglist
	<netfilter-devel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Linux Netdev List
	<netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: panic on rmmod of nf_conntrack_irc
Date: Tue, 14 Apr 2009 13:32:29 +0200	[thread overview]
Message-ID: <49E4744D.5090205@trash.net> (raw)
In-Reply-To: <20090410191736.21efab8c@mako-desktop>

[-- Attachment #1: Type: text/plain, Size: 770 bytes --]

Mariusz Kozlowski wrote:
> 	Recent kernels (i.e. 2.6.30-rc1) will panic while doing rmmod of nf_conntrack_irc.
> 
> (gdb) l *(nf_conntrack_helper_unregister+0x158)
> 0x4f8 is in nf_conntrack_helper_unregister (/home/mako/linux/lkt/sources/linux-2.6/include/net/netfilter/nf_conntrack.h:133).
> 128	};
> 129	
> 130	static inline struct nf_conn *
> 131	nf_ct_tuplehash_to_ctrack(const struct nf_conntrack_tuple_hash *hash)
> 132	{
> 133		return container_of(hash, struct nf_conn,
> 134				    tuplehash[hash->tuple.dst.dir]);
> 135	}
> 136	
> 137	static inline u_int16_t nf_ct_l3num(const struct nf_conn *ct)
> 
> 
> I bisected it down to
> 
>     netfilter: nf_conntrack: use SLAB_DESTROY_BY_RCU and get rid of call_rcu()

Thanks for the report. Does this patch fix it?


[-- Attachment #2: x --]
[-- Type: text/plain, Size: 613 bytes --]

diff --git a/net/netfilter/nf_conntrack_helper.c b/net/netfilter/nf_conntrack_helper.c
index 30b8e90..0fa5a42 100644
--- a/net/netfilter/nf_conntrack_helper.c
+++ b/net/netfilter/nf_conntrack_helper.c
@@ -176,7 +176,7 @@ static void __nf_conntrack_helper_unregister(struct nf_conntrack_helper *me,
 	}
 
 	/* Get rid of expecteds, set helpers to NULL. */
-	hlist_for_each_entry(h, nn, &net->ct.unconfirmed, hnnode)
+	hlist_nulls_for_each_entry(h, nn, &net->ct.unconfirmed, hnnode)
 		unhelp(h, me);
 	for (i = 0; i < nf_conntrack_htable_size; i++) {
 		hlist_nulls_for_each_entry(h, nn, &net->ct.hash[i], hnnode)

WARNING: multiple messages have this Message-ID (diff)
From: Patrick McHardy <kaber@trash.net>
To: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Cc: Eric Dumazet <dada1@cosmosbay.com>,
	Kernel Testers List <kernel-testers@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Netfilter Development Mailinglist 
	<netfilter-devel@vger.kernel.org>,
	Linux Netdev List <netdev@vger.kernel.org>
Subject: Re: panic on rmmod of nf_conntrack_irc
Date: Tue, 14 Apr 2009 13:32:29 +0200	[thread overview]
Message-ID: <49E4744D.5090205@trash.net> (raw)
In-Reply-To: <20090410191736.21efab8c@mako-desktop>

[-- Attachment #1: Type: text/plain, Size: 770 bytes --]

Mariusz Kozlowski wrote:
> 	Recent kernels (i.e. 2.6.30-rc1) will panic while doing rmmod of nf_conntrack_irc.
> 
> (gdb) l *(nf_conntrack_helper_unregister+0x158)
> 0x4f8 is in nf_conntrack_helper_unregister (/home/mako/linux/lkt/sources/linux-2.6/include/net/netfilter/nf_conntrack.h:133).
> 128	};
> 129	
> 130	static inline struct nf_conn *
> 131	nf_ct_tuplehash_to_ctrack(const struct nf_conntrack_tuple_hash *hash)
> 132	{
> 133		return container_of(hash, struct nf_conn,
> 134				    tuplehash[hash->tuple.dst.dir]);
> 135	}
> 136	
> 137	static inline u_int16_t nf_ct_l3num(const struct nf_conn *ct)
> 
> 
> I bisected it down to
> 
>     netfilter: nf_conntrack: use SLAB_DESTROY_BY_RCU and get rid of call_rcu()

Thanks for the report. Does this patch fix it?


[-- Attachment #2: x --]
[-- Type: text/plain, Size: 613 bytes --]

diff --git a/net/netfilter/nf_conntrack_helper.c b/net/netfilter/nf_conntrack_helper.c
index 30b8e90..0fa5a42 100644
--- a/net/netfilter/nf_conntrack_helper.c
+++ b/net/netfilter/nf_conntrack_helper.c
@@ -176,7 +176,7 @@ static void __nf_conntrack_helper_unregister(struct nf_conntrack_helper *me,
 	}
 
 	/* Get rid of expecteds, set helpers to NULL. */
-	hlist_for_each_entry(h, nn, &net->ct.unconfirmed, hnnode)
+	hlist_nulls_for_each_entry(h, nn, &net->ct.unconfirmed, hnnode)
 		unhelp(h, me);
 	for (i = 0; i < nf_conntrack_htable_size; i++) {
 		hlist_nulls_for_each_entry(h, nn, &net->ct.hash[i], hnnode)

       reply	other threads:[~2009-04-14 11:32 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20090410191736.21efab8c@mako-desktop>
2009-04-14 11:32 ` Patrick McHardy [this message]
2009-04-14 11:32   ` panic on rmmod of nf_conntrack_irc Patrick McHardy
2009-04-14 12:06   ` Eric Dumazet
2009-04-14 12:16     ` Patrick McHardy
2009-04-14 12:16       ` Patrick McHardy
2009-04-14 19:19       ` Mariusz Kozlowski
2009-04-14 19:19         ` Mariusz Kozlowski
2009-04-14 19:19         ` Mariusz Kozlowski
2009-04-14 20:06         ` Mariusz Kozlowski
2009-04-14 20:06           ` Mariusz Kozlowski
2009-04-14 20:06           ` Mariusz Kozlowski
2009-04-14 20:14         ` Eric Dumazet
2009-04-14 20:14           ` Eric Dumazet
2009-04-14 20:39           ` Mariusz Kozlowski
2009-04-14 20:39             ` Mariusz Kozlowski
2009-04-14 20:46           ` Eric Leblond
2009-04-14 21:07             ` [PATCH] netfilter: nf_log fix Eric Dumazet
2009-04-15 10:20               ` Patrick McHardy
     [not found]     ` <49E47C2D.1050508-fPLkHRcR87vqlBn2x/YWAg@public.gmane.org>
2009-04-15 10:26       ` panic on rmmod of nf_conntrack_irc Patrick McHardy
2009-04-15 10:26         ` Patrick McHardy
2009-04-15 10:42         ` Eric Dumazet
2009-04-15 10:42           ` Eric Dumazet
2009-04-15 10:44           ` Patrick McHardy
2009-04-15 10:45           ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49E4744D.5090205@trash.net \
    --to=kaber-dcujhnylwpneowh0uzbu5w@public.gmane.org \
    --cc=dada1-fPLkHRcR87vqlBn2x/YWAg@public.gmane.org \
    --cc=kernel-testers-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=m.kozlowski-NWF1p15JEu3VItvQsEIGlw@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=netfilter-devel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.