* [PATCH] [NETFILTER] Remove BUG_ON() in destroy_conntrack()
2006-02-02 11:38 ` [PATCH] [CT_SYNC] Fix use of unitializied tuplehash list-head Holger Eitzenberger
@ 2006-02-02 11:38 ` Holger Eitzenberger
2006-02-02 14:47 ` Patrick McHardy
0 siblings, 1 reply; 6+ messages in thread
From: Holger Eitzenberger @ 2006-02-02 11:38 UTC (permalink / raw)
To: netfilter-devel; +Cc: Harald Welte, Patrick McHardy
Remove BUG_ON(list_empty(...)) check in destroy_conntrack because
it is perfectly valid for conntracks to be in no list at all, e. g.
if ct_sync is used.
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Holger Eitzenberger <heitzenberger@astaro.com>
---
net/ipv4/netfilter/ip_conntrack_core.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
8f62bac9822927ea1306d4752ca48cb1d9f73ff0
diff --git a/net/ipv4/netfilter/ip_conntrack_core.c b/net/ipv4/netfilter/ip_conntrack_core.c
index 14660db..6bec236 100644
--- a/net/ipv4/netfilter/ip_conntrack_core.c
+++ b/net/ipv4/netfilter/ip_conntrack_core.c
@@ -339,10 +339,8 @@ destroy_conntrack(struct nf_conntrack *n
ip_ct_remove_expectations(ct);
/* We overload first tuple to link into unconfirmed list. */
- if (!is_confirmed(ct)) {
- BUG_ON(list_empty(&ct->tuplehash[IP_CT_DIR_ORIGINAL].list));
+ if (!is_confirmed(ct))
list_del(&ct->tuplehash[IP_CT_DIR_ORIGINAL].list);
- }
CONNTRACK_STAT_INC(delete);
write_unlock_bh(&ip_conntrack_lock);
--
-dirty
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] [CT_SYNC] Fix use of unitializied tuplehash list-head
2006-02-02 11:38 ` Holger Eitzenberger
@ 2006-02-02 11:38 ` Holger Eitzenberger
2006-02-02 11:38 ` [PATCH] [NETFILTER] Remove BUG_ON() in destroy_conntrack() Holger Eitzenberger
0 siblings, 1 reply; 6+ messages in thread
From: Holger Eitzenberger @ 2006-02-02 11:38 UTC (permalink / raw)
To: netfilter-devel; +Cc: Harald Welte, Patrick McHardy
ct_sync fails to initialize its tuplehash list-head upon creation
of a new conntrack, so that an list_del() later on in
destroy_conntrack() leads to a crash.
This patch initializes the list-head.
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Holger Eitzenberger <heitzenberger@astaro.com>
---
ct_sync/ct_sync_main.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
3bdbf56aa5e9e7411d8f32fa896f51ebd5a8ce15
diff --git a/ct_sync/ct_sync_main.c b/ct_sync/ct_sync_main.c
index 372374d..a73fd97 100644
--- a/ct_sync/ct_sync_main.c
+++ b/ct_sync/ct_sync_main.c
@@ -613,6 +613,8 @@ ct_sync_msg_process_update_ct(struct ct_
CT_SYNC_LEAVE();
return -1;
}
+
+ INIT_LIST_HEAD(&ct->tuplehash[IP_CT_DIR_ORIGINAL].list);
new = 1;
}
--
-dirty
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Fix ct_sync crash
2006-02-02 11:38 Fix ct_sync crash Holger Eitzenberger
@ 2006-02-02 11:38 ` Holger Eitzenberger
2006-02-02 11:38 ` Holger Eitzenberger
0 siblings, 1 reply; 6+ messages in thread
From: Holger Eitzenberger @ 2006-02-02 11:38 UTC (permalink / raw)
To: netfilter-devel
GIT: Please enter your email below.
GIT: Lines beginning in "GIT: " will be removed.
GIT: Consider including an overall diffstat or table of contents
GIT: for the patch you are writing.
Hi,
the following two patches fix a bug in ct_sync.
Please apply, thanks!
/holger
^ permalink raw reply [flat|nested] 6+ messages in thread
* Fix ct_sync crash
@ 2006-02-02 11:38 Holger Eitzenberger
2006-02-02 11:38 ` Holger Eitzenberger
0 siblings, 1 reply; 6+ messages in thread
From: Holger Eitzenberger @ 2006-02-02 11:38 UTC (permalink / raw)
To: netfilter-devel
Hi,
the following two patches fix a bug in ct_sync.
Please apply, thanks!
/holger
^ permalink raw reply [flat|nested] 6+ messages in thread
* Fix ct_sync crash
2006-02-02 11:38 ` Holger Eitzenberger
@ 2006-02-02 11:38 ` Holger Eitzenberger
2006-02-02 11:38 ` [PATCH] [CT_SYNC] Fix use of unitializied tuplehash list-head Holger Eitzenberger
0 siblings, 1 reply; 6+ messages in thread
From: Holger Eitzenberger @ 2006-02-02 11:38 UTC (permalink / raw)
To: netfilter-devel
Hi,
the following two patches fix a bug in ct_sync.
Please apply, thanks!
/holger
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] [NETFILTER] Remove BUG_ON() in destroy_conntrack()
2006-02-02 11:38 ` [PATCH] [NETFILTER] Remove BUG_ON() in destroy_conntrack() Holger Eitzenberger
@ 2006-02-02 14:47 ` Patrick McHardy
0 siblings, 0 replies; 6+ messages in thread
From: Patrick McHardy @ 2006-02-02 14:47 UTC (permalink / raw)
To: Holger Eitzenberger; +Cc: Harald Welte, netfilter-devel
Holger Eitzenberger wrote:
> Remove BUG_ON(list_empty(...)) check in destroy_conntrack because
> it is perfectly valid for conntracks to be in no list at all, e. g.
> if ct_sync is used.
This should stay in the ct_sync patchset until it is merged.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-02-02 14:47 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-02 11:38 Fix ct_sync crash Holger Eitzenberger
2006-02-02 11:38 ` Holger Eitzenberger
2006-02-02 11:38 ` Holger Eitzenberger
2006-02-02 11:38 ` [PATCH] [CT_SYNC] Fix use of unitializied tuplehash list-head Holger Eitzenberger
2006-02-02 11:38 ` [PATCH] [NETFILTER] Remove BUG_ON() in destroy_conntrack() Holger Eitzenberger
2006-02-02 14:47 ` Patrick McHardy
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.