aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/virtio_net.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2010-04-23 05:10:28 -0400
committerIngo Molnar <mingo@elte.hu>2010-04-23 05:10:30 -0400
commit70bce3ba77540ebe77b8c0e1ac38d281a23fbb5e (patch)
tree34b09a49228f0949ff49dce66a433b0dfd83a2dc /drivers/net/virtio_net.c
parent6eca8cc35b50af1037bc919106dd6dd332c959c2 (diff)
parentd5a30458a90597915977f06e79406b664a41b8ac (diff)
Merge branch 'linus' into perf/core
Merge reason: merge the latest fixes, update to latest -rc. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/net/virtio_net.c')
-rw-r--r--drivers/net/virtio_net.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 6fb783ce20b9..b0577dd1a42d 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -327,6 +327,7 @@ static int add_recvbuf_small(struct virtnet_info *vi, gfp_t gfp)
327 struct scatterlist sg[2]; 327 struct scatterlist sg[2];
328 int err; 328 int err;
329 329
330 sg_init_table(sg, 2);
330 skb = netdev_alloc_skb_ip_align(vi->dev, MAX_PACKET_LEN); 331 skb = netdev_alloc_skb_ip_align(vi->dev, MAX_PACKET_LEN);
331 if (unlikely(!skb)) 332 if (unlikely(!skb))
332 return -ENOMEM; 333 return -ENOMEM;
@@ -352,6 +353,7 @@ static int add_recvbuf_big(struct virtnet_info *vi, gfp_t gfp)
352 char *p; 353 char *p;
353 int i, err, offset; 354 int i, err, offset;
354 355
356 sg_init_table(sg, MAX_SKB_FRAGS + 2);
355 /* page in sg[MAX_SKB_FRAGS + 1] is list tail */ 357 /* page in sg[MAX_SKB_FRAGS + 1] is list tail */
356 for (i = MAX_SKB_FRAGS + 1; i > 1; --i) { 358 for (i = MAX_SKB_FRAGS + 1; i > 1; --i) {
357 first = get_a_page(vi, gfp); 359 first = get_a_page(vi, gfp);