mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
[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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
1f8170b0ec
commit
6e42141009
2 changed files with 3 additions and 1 deletions
|
|
@ -1288,6 +1288,9 @@ static inline void tcp_insert_write_queue_before(struct sk_buff *new,
|
|||
struct sock *sk)
|
||||
{
|
||||
__skb_insert(new, skb->prev, skb, &sk->sk_write_queue);
|
||||
|
||||
if (sk->sk_send_head == skb)
|
||||
sk->sk_send_head = new;
|
||||
}
|
||||
|
||||
static inline void tcp_unlink_write_queue(struct sk_buff *skb, struct sock *sk)
|
||||
|
|
|
|||
Loading…
Reference in a new issue