diff options
author | David S. Miller <davem@davemloft.net> | 2011-01-26 13:49:30 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-01-26 13:49:30 -0800 |
commit | b4e69ac670d71b5748dc81e536b2cb103489badd (patch) | |
tree | 26a04ba5d950657132fd6acb4e0ef17d0bcabe93 /net/core | |
parent | 144ce879b057c760194d808c90826cd96308f423 (diff) | |
parent | 7cc2edb83447775a34ed3bf9d29d8295a434b523 (diff) | |
download | op-kernel-dev-b4e69ac670d71b5748dc81e536b2cb103489badd.zip op-kernel-dev-b4e69ac670d71b5748dc81e536b2cb103489badd.tar.gz |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/ethtool.c | 2 | ||||
-rw-r--r-- | net/core/skbuff.c | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/net/core/ethtool.c b/net/core/ethtool.c index bd1af99..5984ee0 100644 --- a/net/core/ethtool.c +++ b/net/core/ethtool.c @@ -817,7 +817,7 @@ static int ethtool_get_regs(struct net_device *dev, char __user *useraddr) if (regs.len > reglen) regs.len = reglen; - regbuf = vmalloc(reglen); + regbuf = vzalloc(reglen); if (!regbuf) return -ENOMEM; diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 436c4c43..a8b1e3c 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -2744,8 +2744,12 @@ int skb_gro_receive(struct sk_buff **head, struct sk_buff *skb) merge: if (offset > headlen) { - skbinfo->frags[0].page_offset += offset - headlen; - skbinfo->frags[0].size -= offset - headlen; + unsigned int eat = offset - headlen; + + skbinfo->frags[0].page_offset += eat; + skbinfo->frags[0].size -= eat; + skb->data_len -= eat; + skb->len -= eat; offset = headlen; } |