All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira <pablo@eurodev.net>
To: netfilter-devel@lists.netfilter.org
Subject: ip_ct_refresh lock issue
Date: Sat, 28 Feb 2004 15:18:28 +0100	[thread overview]
Message-ID: <4040A334.3020808@eurodev.net> (raw)

Hi list,

I can't see the reason why in ip_ct_refresh the conntrack is locked to 
modify an not confirmed conntrack timeout.

It isn't inserted in the conntrack table yet, so why do we need to do 
that? any possible race here?

        WRITE_LOCK(&ip_conntrack_lock);
        /* If not in hash table, timer will not be active yet */
        if (!is_confirmed(ct))
                ct->timeout.expires = extra_jiffies;
        else {
                /* Need del_timer for race avoidance (may already be 
dying). */
                if (del_timer(&ct->timeout)) {
                        ct->timeout.expires = jiffies + extra_jiffies;
                        add_timer(&ct->timeout);
                }
        }
        WRITE_UNLOCK(&ip_conntrack_lock);
}

best regards,
Pablo

             reply	other threads:[~2004-02-28 14:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-28 14:18 Pablo Neira [this message]
2004-02-28 14:54 ` ip_ct_refresh lock issue Henrik Nordstrom
2004-02-28 15:04   ` Pablo Neira

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=4040A334.3020808@eurodev.net \
    --to=pablo@eurodev.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.