* [PATCH 2.4] destroy_conntrack optimization
@ 2003-10-02 14:11 Harald Welte
2003-10-03 6:01 ` David S. Miller
0 siblings, 1 reply; 2+ messages in thread
From: Harald Welte @ 2003-10-02 14:11 UTC (permalink / raw)
To: David Miller; +Cc: Netfilter Development Mailinglist
[-- Attachment #1.1: Type: text/plain, Size: 461 bytes --]
Hi Dave!
sorry for the subject in my last email, I hit the send button too fast
:(
--
- Harald Welte <laforge@netfilter.org> http://www.netfilter.org/
============================================================================
"Fragmentation is like classful addressing -- an interesting early
architectural error that shows how much experimentation was going
on while IP was being designed." -- Paul Vixie
[-- Attachment #1.2: Type: message/rfc822, Size: 3608 bytes --]
[-- Attachment #1.2.1.1.1: Type: text/plain, Size: 633 bytes --]
Hi Davem!
Please apply the following patchto your 2.4 tree and push it to Marcelo.
Thanks.
Author: Patrick McHardy <kaber@trash.net>
Status: Submitted for kernel inclusion at 2.4.23-pre5 time
Don't call ip_conntrack_put with ip_conntrack_lock held
--
- Harald Welte <laforge@netfilter.org> http://www.netfilter.org/
============================================================================
"Fragmentation is like classful addressing -- an interesting early
architectural error that shows how much experimentation was going
on while IP was being designed." -- Paul Vixie
[-- Attachment #1.2.1.1.2: 77_destroy-conntrack.patch --]
[-- Type: text/plain, Size: 1593 bytes --]
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.1136 -> 1.1137
# net/ipv4/netfilter/ip_conntrack_core.c 1.26 -> 1.27
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/09/28 kaber@trash.net 1.1137
# [NETFILTER]: Don't call ip_conntrack_put with ip_conntrack_lock held
# --------------------------------------------
#
diff -Nru a/net/ipv4/netfilter/ip_conntrack_core.c b/net/ipv4/netfilter/ip_conntrack_core.c
--- a/net/ipv4/netfilter/ip_conntrack_core.c Sun Sep 28 04:41:08 2003
+++ b/net/ipv4/netfilter/ip_conntrack_core.c Sun Sep 28 04:41:08 2003
@@ -308,7 +308,7 @@
static void
destroy_conntrack(struct nf_conntrack *nfct)
{
- struct ip_conntrack *ct = (struct ip_conntrack *)nfct;
+ struct ip_conntrack *ct = (struct ip_conntrack *)nfct, *master = NULL;
struct ip_conntrack_protocol *proto;
DEBUGP("destroy_conntrack(%p)\n", ct);
@@ -335,11 +335,14 @@
/* can't call __unexpect_related here,
* since it would screw up expect_list */
list_del(&ct->master->expected_list);
- ip_conntrack_put(ct->master->expectant);
+ master = ct->master->expectant;
}
kfree(ct->master);
}
WRITE_UNLOCK(&ip_conntrack_lock);
+
+ if (master)
+ ip_conntrack_put(master);
DEBUGP("destroy_conntrack: returning ct=%p to slab\n", ct);
kmem_cache_free(ip_conntrack_cachep, ct);
[-- Attachment #1.2.1.2: Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-10-03 6:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-02 14:11 [PATCH 2.4] destroy_conntrack optimization Harald Welte
2003-10-03 6:01 ` David S. Miller
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.