]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[DCCP]: Make dccp_write_xmit always free the packet
authorHerbert Xu <herbert@gondor.apana.org.au>
Sun, 16 Oct 2005 11:08:46 +0000 (21:08 +1000)
committerArnaldo Carvalho de Melo <acme@mandriva.com>
Thu, 20 Oct 2005 16:44:29 +0000 (14:44 -0200)
commitffa29347dfbc158d1f47f5925324a6f5713659c1
tree66c0360d21cc842af830b9c7ffd6e924652e7ce3
parentfda0fd6c5b722cc48e904e0daafedca275d332af
[DCCP]: Make dccp_write_xmit always free the packet

icmp_send doesn't use skb->sk at all so even if skb->sk has already
been freed it can't cause crash there (it would've crashed somewhere
else first, e.g., ip_queue_xmit).

I found a double-free on an skb that could explain this though.
dccp_sendmsg and dccp_write_xmit are a little confused as to what
should free the packet when something goes wrong.  Sometimes they
both go for the ball and end up in each other's way.

This patch makes dccp_write_xmit always free the packet no matter
what.  This makes sense since dccp_transmit_skb which in turn comes
from the fact that ip_queue_xmit always frees the packet.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
net/dccp/output.c
net/dccp/proto.c