All of lore.kernel.org
 help / color / mirror / Atom feed
* locking issue in ip_conntrack_alter_reply
@ 2004-04-30 17:09 Pablo Neira
  2004-05-03  9:05 ` Jozsef Kadlecsik
  0 siblings, 1 reply; 8+ messages in thread
From: Pablo Neira @ 2004-04-30 17:09 UTC (permalink / raw)
  To: Netfilter Development Mailinglist, Patrick McHardy

Hi everyone,

I submitted a patch for a similar issue not a long time ago. See:

http://lists.netfilter.org/pipermail/netfilter-devel/2004-March/014764.html

Well, actually I found a contradiction here, we write-locked the 
conntrack table but that assertion says that this conntrack is not 
confirmed, this implies that the conntrack is not in the hash table yet. 
If that assertion is right, we should replace that write_lock for a 
read_lock while calling __ip_conntrack_find and remove that write_lock 
at the end of the function.

int ip_conntrack_alter_reply(struct ip_conntrack *conntrack,
                             const struct ip_conntrack_tuple *newreply)
{
        WRITE_LOCK(&ip_conntrack_lock);
        if (__ip_conntrack_find(newreply, conntrack)) {
                WRITE_UNLOCK(&ip_conntrack_lock);
                return 0;
        }
        /* Should be unconfirmed, so not in hash table yet */
        IP_NF_ASSERT(!is_confirmed(conntrack)); <--------------------------


I'll study if that assertion is right before submitting a patch. 
Feedback is always welcome :-).

regards,
Pablo

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-05-04  7:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-30 17:09 locking issue in ip_conntrack_alter_reply Pablo Neira
2004-05-03  9:05 ` Jozsef Kadlecsik
2004-05-03 12:15   ` Patrick McHardy
2004-05-03 13:05     ` Pablo Neira
2004-05-03 13:25       ` Henrik Nordstrom
2004-05-03 13:26         ` Pablo Neira
2004-05-03 13:09     ` Jozsef Kadlecsik
2004-05-04  7:01   ` KOVACS Krisztian

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.