All of lore.kernel.org
 help / color / mirror / Atom feed
From: Phil Oester <kernel@linuxace.com>
To: Patrick McHardy <kaber@trash.net>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: Deadlocks
Date: Thu, 17 Jun 2004 08:59:46 -0700	[thread overview]
Message-ID: <20040617155946.GA28564@linuxace.com> (raw)
In-Reply-To: <40CE95DE.9090703@trash.net>

Yes, my statement was not clear at all.  What I meant was something like:

cpu 1:
  conntrack helper calls ip_conntrack_expect_related

cpu 2:
  nat helper calls ip_conntrack_change_expect

CPU 2 ends up causing a duplicate expectation, because the nat helper
changed the expectation to match the one created by cpu 1.

I do see duplicate expectations occasionally:

# grep EXP /proc/net/ip_conntrack 
EXPECTING: - use=1 proto=6 src=10.20.116.197 dst=10.20.153.248 sport=0 dport=4309 
EXPECTING: - use=1 proto=6 src=10.20.116.197 dst=10.20.153.248 sport=0 dport=4309 

which may or may not be related to the above.

In any event, I have applied your patch to 2.6.7, and am running it.  Typically
the box would not last more than a couple days, so I'll let you know what 
happens.

Phil

On Tue, Jun 15, 2004 at 08:23:26AM +0200, Patrick McHardy wrote:
> Phil Oester wrote:
> >so the nat helper is changing the expectation -- potentially at the same 
> >time
> >the conntrack helper is calling ip_conntrack_expect.  If the private lock
> >were removed, could this not cause a race condition if the expectation got
> >created just after the nat-helper changed the expectation?  
> 
> I don't understand what you mean. The nat-helper can not change the
> expectation before it's created, and once it's created it can not
> be touched by the conntrack helper anymore. ip_ftp_lock is protecting
> ftp_buffer and ct_ftp_info, so it can be dropped directly after the
> call to find_pattern. The help function in the nat_helper only touches
> the expectation, which is protected by ip_conntrack_lock, so it doesn't
> need ip_ftp_lock lock at all.

  reply	other threads:[~2004-06-17 15:59 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-09 18:09 Deadlocks Phil Oester
2004-06-10  8:07 ` Deadlocks Jozsef Kadlecsik
2004-06-10 15:02   ` Deadlocks Phil Oester
2004-06-13 19:58 ` Deadlocks Patrick McHardy
2004-06-15  4:47   ` Deadlocks Phil Oester
2004-06-15  6:23     ` Deadlocks Patrick McHardy
2004-06-17 15:59       ` Phil Oester [this message]
2004-06-17 16:20         ` Deadlocks Patrick McHardy
2004-06-18 17:12           ` Deadlocks Phil Oester
2004-06-21  0:46             ` Deadlocks Patrick McHardy
2004-06-22  4:31               ` Deadlocks Phil Oester
2004-06-22  9:52                 ` Deadlocks Patrick McHardy
2004-06-29 17:54               ` Deadlocks Phil Oester
2004-06-29 18:00                 ` Deadlocks Patrick McHardy
2004-06-29 20:09                   ` Deadlocks Phil Oester
2004-06-30  9:50                     ` Deadlocks Patrick McHardy
2004-07-01 16:12                       ` Deadlocks Phil Oester

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=20040617155946.GA28564@linuxace.com \
    --to=kernel@linuxace.com \
    --cc=kaber@trash.net \
    --cc=netfilter-devel@lists.netfilter.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.