tree 1f2fe837d53cc894c81710623bb1fd99f3b52a8d
parent 7ad07e7cf343181002c10c39d3f57a88e4903d4f
author Arnaldo Carvalho de Melo <[EMAIL PROTECTED]> Wed, 24 Aug 2005 11:50:21 
-0700
committer David S. Miller <[EMAIL PROTECTED]> Tue, 30 Aug 2005 06:04:38 -0700

[DCCP]: Fix skb leak in dccp_sendmsg

Signed-off-by: Arnaldo Carvalho de Melo <[EMAIL PROTECTED]>
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>

 net/dccp/proto.c |   12 ++++++++++++
 1 files changed, 12 insertions(+)

diff --git a/net/dccp/proto.c b/net/dccp/proto.c
--- a/net/dccp/proto.c
+++ b/net/dccp/proto.c
@@ -206,6 +206,18 @@ int dccp_sendmsg(struct kiocb *iocb, str
                goto out_discard;
 
        rc = dccp_write_xmit(sk, skb, len);
+       /*
+        * XXX we don't use sk_write_queue, so just discard the packet.
+        *     Current plan however is to _use_ sk_write_queue with
+        *     an algorith similar to tcp_sendmsg, where the main difference
+        *     is that in DCCP we have to respect packet boundaries, so
+        *     no coalescing of skbs.
+        *
+        *     This bug was _quickly_ found & fixed by just looking at an OSTRA
+        *     generated callgraph 8) -acme
+        */
+       if (rc != 0)
+               goto out_discard;
 out_release:
        release_sock(sk);
        return rc ? : len;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to