* [PATCH 2/3] refcount leak of proto when ctnetlink dumping tuple
@ 2005-11-04 16:12 Yasuyuki KOZAKAI
2005-11-04 17:41 ` Pablo Neira
0 siblings, 1 reply; 3+ messages in thread
From: Yasuyuki KOZAKAI @ 2005-11-04 16:12 UTC (permalink / raw)
To: netfilter-devel; +Cc: laforge
[-- Attachment #1: Type: Text/Plain, Size: 67 bytes --]
Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>
[-- Attachment #2: 02-ctnl-refcnt.patch --]
[-- Type: Text/Plain, Size: 1343 bytes --]
[NETFILTER] refcount leak of proto when ctnetlink dumping tuple
Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>
---
commit 3a4486b6419a1f25324bb4280d51f5c77b1117f7
tree 88b1831d06e21417baca01d1632131d96e3be611
parent 61a002f080c6473da94f28314502ff0f15fe3625
author Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp> Fri, 04 Nov 2005 14:35:27 +0900
committer Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp> Fri, 04 Nov 2005 14:35:27 +0900
net/ipv4/netfilter/ip_conntrack_netlink.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/net/ipv4/netfilter/ip_conntrack_netlink.c b/net/ipv4/netfilter/ip_conntrack_netlink.c
--- a/net/ipv4/netfilter/ip_conntrack_netlink.c
+++ b/net/ipv4/netfilter/ip_conntrack_netlink.c
@@ -58,14 +58,17 @@ ctnetlink_dump_tuples_proto(struct sk_bu
const struct ip_conntrack_tuple *tuple)
{
struct ip_conntrack_protocol *proto;
+ int ret = 0;
NFA_PUT(skb, CTA_PROTO_NUM, sizeof(u_int8_t), &tuple->dst.protonum);
proto = ip_conntrack_proto_find_get(tuple->dst.protonum);
- if (proto && proto->tuple_to_nfattr)
- return proto->tuple_to_nfattr(skb, tuple);
+ if (likely(proto && proto->tuple_to_nfattr)) {
+ ret = proto->tuple_to_nfattr(skb, tuple);
+ ip_conntrack_proto_put(proto);
+ }
- return 0;
+ return ret;
nfattr_failure:
return -1;
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH 2/3] refcount leak of proto when ctnetlink dumping tuple
2005-11-04 16:12 [PATCH 2/3] refcount leak of proto when ctnetlink dumping tuple Yasuyuki KOZAKAI
@ 2005-11-04 17:41 ` Pablo Neira
2005-11-04 20:42 ` Harald Welte
0 siblings, 1 reply; 3+ messages in thread
From: Pablo Neira @ 2005-11-04 17:41 UTC (permalink / raw)
To: Yasuyuki KOZAKAI; +Cc: laforge, netfilter-devel
Yasuyuki KOZAKAI wrote:
> Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>
>
>
> ------------------------------------------------------------------------
>
> [NETFILTER] refcount leak of proto when ctnetlink dumping tuple
>
> Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>
Thanks a lot for all the fixes. I've been busy fixing bugs in the
userspace part :(. BTW, I think that this patch fixes the bug reported
at dumping (Krzysztof).
As I told you during the workshop, I'll send a patch with the ctnetlink
port for nfnetlink asap.
--
Pablo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-11-04 20:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-04 16:12 [PATCH 2/3] refcount leak of proto when ctnetlink dumping tuple Yasuyuki KOZAKAI
2005-11-04 17:41 ` Pablo Neira
2005-11-04 20:42 ` Harald Welte
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.