All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Yasuyuki KOZAKAI <yasuyuki.kozakai@toshiba.co.jp>
Cc: laforge@netfilter.org, netfilter-devel@lists.netfilter.org,
	pablo@eurodev.net
Subject: Re: [RFC] [PATCH] nf_conntrack_netlink port take#2
Date: Sun, 04 Dec 2005 17:22:52 +0100	[thread overview]
Message-ID: <439317DC.7090609@trash.net> (raw)
In-Reply-To: <200511270708.jAR78snC018182@toshiba.co.jp>

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

Yasuyuki KOZAKAI wrote:
>>@@ -1383,6 +1550,18 @@ void nf_conntrack_cleanup(void)
>> 		schedule();
>> 		goto i_see_dead_people;
>> 	}
>>+	/* wait until all references to ip_conntrack_untracked are dropped */
>>+	while (atomic_read(&nf_conntrack_untracked.ct_general.use) > 1)
>>+		schedule();
>>+}
> 
> 
> [nfct] nice catch! I think this would better to be applied to mainline ASAP.

Agreed. I've added this patch to my tree.


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

[NETFILTER]: Wait for untracked references in nf_conntrack module unload

Noticed by Pablo Neira <pablo@eurodev.net>.

Signed-off-by: Patrick McHardy <kaber@trash.net>

---
commit 96c75906027f008ed3a4058a606938901e9c6d99
tree 87b8bb22d35f61383fbb5f4ee6164a16cc256bb3
parent aea6c7fa24378c7f38026177c0b524719789b4be
author Patrick McHardy <kaber@trash.net> Sun, 04 Dec 2005 17:22:02 +0100
committer Patrick McHardy <kaber@trash.net> Sun, 04 Dec 2005 17:22:02 +0100

 net/netfilter/nf_conntrack_core.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index 1da6783..a99285d 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -1383,6 +1383,9 @@ void nf_conntrack_cleanup(void)
 		schedule();
 		goto i_see_dead_people;
 	}
+	/* wait until all references to nf_conntrack_untracked are dropped */
+	while (atomic_read(&nf_conntrack_untracked.ct_general.use) > 1)
+		break;
 
 	for (i = 0; i < NF_CT_F_NUM; i++) {
 		if (nf_ct_cache[i].use == 0)

      parent reply	other threads:[~2005-12-04 16:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-22 19:22 [RFC] [PATCH] nf_conntrack_netlink port take#2 Pablo Neira
2005-11-22 22:08 ` Harald Welte
2005-11-23  1:21   ` Pablo Neira
2005-11-25  5:00 ` Yasuyuki KOZAKAI
2005-11-27  7:08   ` Yasuyuki KOZAKAI
2005-11-27 15:12     ` Patrick McHardy
2005-12-04 16:22     ` Patrick McHardy [this message]

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=439317DC.7090609@trash.net \
    --to=kaber@trash.net \
    --cc=laforge@netfilter.org \
    --cc=netfilter-devel@lists.netfilter.org \
    --cc=pablo@eurodev.net \
    --cc=yasuyuki.kozakai@toshiba.co.jp \
    /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.