* [PATCH] locking issue in alter_reply
@ 2004-08-05 13:32 Pablo Neira
2004-08-05 14:29 ` Patrick McHardy
0 siblings, 1 reply; 3+ messages in thread
From: Pablo Neira @ 2004-08-05 13:32 UTC (permalink / raw)
To: Netfilter Development Mailinglist, Patrick McHardy, Harald Welte
[-- Attachment #1: Type: text/plain, Size: 244 bytes --]
Hi,
This the first of a set of patches. Actually this patch is a resend, I
think that it got lost. Actually, we don't need to write lock the
conntrack table because we always call alter_reply with a non-confirmed
conntrack.
regards,
Pablo
[-- Attachment #2: lock-alter-reply.patch --]
[-- Type: text/x-patch, Size: 869 bytes --]
diff -u -r1.2 ip_conntrack_core.c
--- a/net/ipv4/netfilter/ip_conntrack_core.c 4 Aug 2004 15:26:55 -0000 1.2
+++ b/net/ipv4/netfilter/ip_conntrack_core.c 4 Aug 2004 16:46:10 -0000
@@ -1075,9 +1075,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 */
@@ -1089,7 +1089,7 @@
conntrack->tuplehash[IP_CT_DIR_REPLY].tuple = *newreply;
if (!conntrack->master && list_empty(&conntrack->sibling_list))
conntrack->helper = ip_ct_find_helper(newreply);
- WRITE_UNLOCK(&ip_conntrack_lock);
+ READ_UNLOCK(&ip_conntrack_lock);
return 1;
}
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] locking issue in alter_reply
2004-08-05 13:32 [PATCH] locking issue in alter_reply Pablo Neira
@ 2004-08-05 14:29 ` Patrick McHardy
2004-08-05 22:23 ` Pablo Neira
0 siblings, 1 reply; 3+ messages in thread
From: Patrick McHardy @ 2004-08-05 14:29 UTC (permalink / raw)
To: Pablo Neira; +Cc: Netfilter Development Mailinglist, Harald Welte
Hi Pablo,
Pablo Neira wrote:
> Hi,
>
> This the first of a set of patches. Actually this patch is a resend, I
> think that it got lost. Actually, we don't need to write lock the
> conntrack table because we always call alter_reply with a
> non-confirmed conntrack.
Harald suggested to concentrate our efforts on nf_conntrack and
only continue to put bugfixes in ip_conntrack, and I agree with him.
This patch is fairly small, but I'll let him decide.
Regards
Patrick
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] locking issue in alter_reply
2004-08-05 14:29 ` Patrick McHardy
@ 2004-08-05 22:23 ` Pablo Neira
0 siblings, 0 replies; 3+ messages in thread
From: Pablo Neira @ 2004-08-05 22:23 UTC (permalink / raw)
To: Patrick McHardy; +Cc: Netfilter Development Mailinglist, Harald Welte
Hi Patrick,
Patrick McHardy wrote:
> Harald suggested to concentrate our efforts on nf_conntrack and
> only continue to put bugfixes in ip_conntrack, and I agree with him.
> This patch is fairly small, but I'll let him decide.
I see, actually I haven't seen that patch. Well I agree with you, that
layer 3 abstraction for the conntrack looks interesting. So I'll
concentrate my efforts in nf_conntrack since now.
regards,
Pablo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-08-05 22:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-05 13:32 [PATCH] locking issue in alter_reply Pablo Neira
2004-08-05 14:29 ` Patrick McHardy
2004-08-05 22:23 ` Pablo Neira
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.