aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>2007-11-20 02:24:09 -0500
committerDavid S. Miller <davem@davemloft.net>2007-11-20 02:24:09 -0500
commit6e42141009ff18297fe19d19296738b742f861db (patch)
tree6bbe19922e9b24d0ce4df6effc45abcf0aa2af51 /include/net
parent1f8170b0ecd8363847792b3b1f269e9d8e10391a (diff)
[TCP] MTUprobe: fix potential sk_send_head corruption
When the abstraction functions got added, conversion here was made incorrectly. As a result, the skb may end up pointing to skb which got included to the probe skb and then was freed. For it to trigger, however, skb_transmit must fail sending as well. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/tcp.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h
index d695cea7730d..cb5b033e0e59 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -1288,6 +1288,9 @@ static inline void tcp_insert_write_queue_before(struct sk_buff *new,
1288 struct sock *sk) 1288 struct sock *sk)
1289{ 1289{
1290 __skb_insert(new, skb->prev, skb, &sk->sk_write_queue); 1290 __skb_insert(new, skb->prev, skb, &sk->sk_write_queue);
1291
1292 if (sk->sk_send_head == skb)
1293 sk->sk_send_head = new;
1291} 1294}
1292 1295
1293static inline void tcp_unlink_write_queue(struct sk_buff *skb, struct sock *sk) 1296static inline void tcp_unlink_write_queue(struct sk_buff *skb, struct sock *sk)