summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/net/sock.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/sock.h b/include/net/sock.h
index bdd9ebe63392..8a71ab362612 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1200,6 +1200,9 @@ static inline struct sk_buff *sk_stream_alloc_pskb(struct sock *sk,
{
struct sk_buff *skb;
+ /* The TCP header must be at least 32-bit aligned. */
+ size = ALIGN(size, 4);
+
skb = alloc_skb_fclone(size + sk->sk_prot->max_header, gfp);
if (skb) {
skb->truesize += mem;