]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
Drivers: net: hyperv: Allocate memory for all possible per-pecket information
authorKY Srinivasan <kys@microsoft.com>
Wed, 9 Apr 2014 22:00:45 +0000 (15:00 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 11 Apr 2014 19:15:12 +0000 (15:15 -0400)
An outgoing packet can potentially need per-packet information for
all the offloads and VLAN tagging. Fix this issue.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/hyperv/netvsc_drv.c

index 4e4cf9e0c8d7a6c6472f2dee357b8b31a814c2b8..6f39baa67a5f15aa4eeb04b0ab7dbf6ce9cd0cb4 100644 (file)
@@ -319,7 +319,9 @@ static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net)
        packet = kzalloc(sizeof(struct hv_netvsc_packet) +
                         (num_data_pgs * sizeof(struct hv_page_buffer)) +
                         sizeof(struct rndis_message) +
-                        NDIS_VLAN_PPI_SIZE, GFP_ATOMIC);
+                        NDIS_VLAN_PPI_SIZE +
+                        NDIS_CSUM_PPI_SIZE +
+                        NDIS_LSO_PPI_SIZE, GFP_ATOMIC);
        if (!packet) {
                /* out of memory, drop packet */
                netdev_err(net, "unable to allocate hv_netvsc_packet\n");