All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, Patrick McHardy <kaber@trash.net>,
	netfilter-devel@vger.kernel.org
Subject: netfilter 02/03: nf_conntrack: fix crash when unloading helpers
Date: Thu, 16 Apr 2009 19:16:24 +0200 (MEST)	[thread overview]
Message-ID: <20090416171623.11406.45891.sendpatchset@x2.localnet> (raw)
In-Reply-To: <20090416171621.11406.78609.sendpatchset@x2.localnet>

commit 38fb0afcd8761f8858e27135ed89a65117e2019c
Author: Patrick McHardy <kaber@trash.net>
Date:   Wed Apr 15 12:45:08 2009 +0200

    netfilter: nf_conntrack: fix crash when unloading helpers
    
    Commit ea781f197d (netfilter: nf_conntrack: use SLAB_DESTROY_BY_RCU and)
    get rid of call_rcu() was missing one conversion to the hlist_nulls
    functions, causing a crash when unloading conntrack helper modules.
    
    Reported-and-tested-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
    Signed-off-by: Patrick McHardy <kaber@trash.net>

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)

  parent reply	other threads:[~2009-04-16 17:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-16 17:16 netfilter 00/03: netfilter fixes Patrick McHardy
2009-04-16 17:16 ` netfilter 01/03: nf_log regression fix Patrick McHardy
2009-04-16 17:16 ` Patrick McHardy [this message]
2009-04-16 17:16 ` netfilter 03/03: nf_nat: add support for persistent mappings Patrick McHardy
2009-04-16 23:33 ` netfilter 00/03: netfilter fixes 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=20090416171623.11406.45891.sendpatchset@x2.localnet \
    --to=kaber@trash.net \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.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.