Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 193874
b: refs/heads/master
c: 2c45cd4
h: refs/heads/master
v: v3
  • Loading branch information
Shirley Ma authored and David S. Miller committed Mar 31, 2010
1 parent a79b66b commit 7bede3f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 36c0d8cca3283c235c9af1954de641df84c80f0f
refs/heads/master: 2c45cd43ff791cc4ab6a6332165ad53d7bcb3673
2 changes: 2 additions & 0 deletions trunk/drivers/net/virtio_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ static int add_recvbuf_small(struct virtnet_info *vi, gfp_t gfp)
struct scatterlist sg[2];
int err;

sg_init_table(sg, 2);
skb = netdev_alloc_skb_ip_align(vi->dev, MAX_PACKET_LEN);
if (unlikely(!skb))
return -ENOMEM;
Expand All @@ -351,6 +352,7 @@ static int add_recvbuf_big(struct virtnet_info *vi, gfp_t gfp)
char *p;
int i, err, offset;

sg_init_table(sg, MAX_SKB_FRAGS + 2);
/* page in sg[MAX_SKB_FRAGS + 1] is list tail */
for (i = MAX_SKB_FRAGS + 1; i > 1; --i) {
first = get_a_page(vi, gfp);
Expand Down

0 comments on commit 7bede3f

Please sign in to comment.