mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 15:11:48 -04:00
tcp: cleanup sk_tx_skb_cache before reuse
TCP stack relies on the fact that a freshly allocated skb
has skb->cb[] and skb_shinfo(skb)->tx_flags cleared.
When recycling tx skb, we must ensure these fields are cleared.
Fixes: 472c2e07ee ("tcp: add one skb cache for tx")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Soheil Hassas Yeganeh <soheil@google.com>
Cc: Willem de Bruijn <willemb@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
faddd6cf67
commit
eb70a1ae23
1 changed files with 2 additions and 0 deletions
|
|
@ -872,6 +872,8 @@ struct sk_buff *sk_stream_alloc_skb(struct sock *sk, int size, gfp_t gfp,
|
|||
sk->sk_tx_skb_cache = NULL;
|
||||
pskb_trim(skb, 0);
|
||||
INIT_LIST_HEAD(&skb->tcp_tsorted_anchor);
|
||||
skb_shinfo(skb)->tx_flags = 0;
|
||||
memset(TCP_SKB_CB(skb), 0, sizeof(struct tcp_skb_cb));
|
||||
return skb;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue