aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_output.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r--net/ipv4/tcp_output.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 5f28131eb37e..b735c23a961d 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -2353,8 +2353,12 @@ int __tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb)
2353 */ 2353 */
2354 TCP_SKB_CB(skb)->when = tcp_time_stamp; 2354 TCP_SKB_CB(skb)->when = tcp_time_stamp;
2355 2355
2356 /* make sure skb->data is aligned on arches that require it */ 2356 /* make sure skb->data is aligned on arches that require it
2357 if (unlikely(NET_IP_ALIGN && ((unsigned long)skb->data & 3))) { 2357 * and check if ack-trimming & collapsing extended the headroom
2358 * beyond what csum_start can cover.
2359 */
2360 if (unlikely((NET_IP_ALIGN && ((unsigned long)skb->data & 3)) ||
2361 skb_headroom(skb) >= 0xFFFF)) {
2358 struct sk_buff *nskb = __pskb_copy(skb, MAX_TCP_HEADER, 2362 struct sk_buff *nskb = __pskb_copy(skb, MAX_TCP_HEADER,
2359 GFP_ATOMIC); 2363 GFP_ATOMIC);
2360 return nskb ? tcp_transmit_skb(sk, nskb, 0, GFP_ATOMIC) : 2364 return nskb ? tcp_transmit_skb(sk, nskb, 0, GFP_ATOMIC) :
@@ -2666,6 +2670,7 @@ struct sk_buff *tcp_make_synack(struct sock *sk, struct dst_entry *dst,
2666 skb_reserve(skb, MAX_TCP_HEADER); 2670 skb_reserve(skb, MAX_TCP_HEADER);
2667 2671
2668 skb_dst_set(skb, dst); 2672 skb_dst_set(skb, dst);
2673 security_skb_owned_by(skb, sk);
2669 2674
2670 mss = dst_metric_advmss(dst); 2675 mss = dst_metric_advmss(dst);
2671 if (tp->rx_opt.user_mss && tp->rx_opt.user_mss < mss) 2676 if (tp->rx_opt.user_mss && tp->rx_opt.user_mss < mss)