From: Pablo Neira <pablo@eurodev.net>
To: Henrik Nordstrom <hno@marasystems.com>,
Patrick McHardy <kaber@trash.net>,
Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>,
Netfilter Development Mailinglist
<netfilter-devel@lists.netfilter.org>
Subject: Re: locking issue in ip_conntrack_alter_reply
Date: Mon, 03 May 2004 15:26:00 +0200 [thread overview]
Message-ID: <40964868.4040904@eurodev.net> (raw)
In-Reply-To: <Pine.LNX.4.44.0405031523560.15193-100000@filer.marasystems.com>
[-- Attachment #1: Type: text/plain, Size: 195 bytes --]
Hi,
Henrik Nordstrom wrote:
>>Attached the patch to fix this.
>>
>>
>
>Isn't there a LOCK/UNLOCK imbalance in your patch?
>
>
you are right, I should rush... :-( Sorry!
regards,
Pablo
[-- Attachment #2: alter_reply_locking.patch --]
[-- Type: text/plain, Size: 1033 bytes --]
Index: net/ipv4/netfilter/ip_conntrack_core.c
===================================================================
RCS file: /home/cvs/linux-2.6/net/ipv4/netfilter/ip_conntrack_core.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 ip_conntrack_core.c
--- a/net/ipv4/netfilter/ip_conntrack_core.c 2 May 2004 13:26:10 -0000 1.1.1.1
+++ b/net/ipv4/netfilter/ip_conntrack_core.c 3 May 2004 13:23:43 -0000
@@ -1093,9 +1093,9 @@
int ip_conntrack_alter_reply(struct ip_conntrack *conntrack,
const struct ip_conntrack_tuple *newreply)
{
- WRITE_LOCK(&ip_conntrack_lock);
+ READ_LOCK(&ip_conntrack_lock);
if (__ip_conntrack_find(newreply, conntrack)) {
- WRITE_UNLOCK(&ip_conntrack_lock);
+ READ_UNLOCK(&ip_conntrack_lock);
return 0;
}
/* Should be unconfirmed, so not in hash table yet */
@@ -1109,7 +1109,7 @@
conntrack->helper = LIST_FIND(&helpers, helper_cmp,
struct ip_conntrack_helper *,
newreply);
- WRITE_UNLOCK(&ip_conntrack_lock);
+ READ_UNLOCK(&ip_conntrack_lock);
return 1;
}
next prev parent reply other threads:[~2004-05-03 13:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2004-05-03 13:09 ` Jozsef Kadlecsik
2004-05-04 7:01 ` KOVACS Krisztian
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=40964868.4040904@eurodev.net \
--to=pablo@eurodev.net \
--cc=hno@marasystems.com \
--cc=kaber@trash.net \
--cc=kadlec@blackhole.kfki.hu \
--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.