aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKY Srinivasan <kys@microsoft.com>2014-04-09 18:00:45 -0400
committerDavid S. Miller <davem@davemloft.net>2014-04-11 15:15:12 -0400
commit4276372f0dcb191639fa79a171737f4239ded869 (patch)
treec7c896b1e1e93dd5558d2f2fc4619088e7b55e43
parenteb7076182d1ae4bc4641534134ed707100d76acc (diff)
Drivers: net: hyperv: Allocate memory for all possible per-pecket information
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>
-rw-r--r--drivers/net/hyperv/netvsc_drv.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
index 4e4cf9e0c8d7..6f39baa67a5f 100644
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -319,7 +319,9 @@ static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net)
319 packet = kzalloc(sizeof(struct hv_netvsc_packet) + 319 packet = kzalloc(sizeof(struct hv_netvsc_packet) +
320 (num_data_pgs * sizeof(struct hv_page_buffer)) + 320 (num_data_pgs * sizeof(struct hv_page_buffer)) +
321 sizeof(struct rndis_message) + 321 sizeof(struct rndis_message) +
322 NDIS_VLAN_PPI_SIZE, GFP_ATOMIC); 322 NDIS_VLAN_PPI_SIZE +
323 NDIS_CSUM_PPI_SIZE +
324 NDIS_LSO_PPI_SIZE, GFP_ATOMIC);
323 if (!packet) { 325 if (!packet) {
324 /* out of memory, drop packet */ 326 /* out of memory, drop packet */
325 netdev_err(net, "unable to allocate hv_netvsc_packet\n"); 327 netdev_err(net, "unable to allocate hv_netvsc_packet\n");