diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index 71c1a7521d326195f873899390ef4fc8fe30a612..0da505c9ac233b9cf2ca4f20475dc8d987ef68d5 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -1499,10 +1499,11 @@ static int packet_sendmsg_spkt(struct kiocb *iocb, struct socket *sock, if (!skb) { size_t reserved = LL_RESERVED_SPACE(dev); + int tlen = dev->needed_tailroom; unsigned int hhlen = dev->header_ops ? dev->hard_header_len : 0; rcu_read_unlock(); - skb = sock_wmalloc(sk, len + reserved, 0, GFP_KERNEL); + skb = sock_wmalloc(sk, len + reserved + tlen, 0, GFP_KERNEL); if (skb == NULL) return -ENOBUFS; /* FIXME: Save some space for broken drivers that write a hard