diff options
author | David S. Miller <davem@davemloft.net> | 2011-03-10 17:26:00 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-10 17:26:00 -0500 |
commit | 33175d84ee3fa29991adb80513683e010769e807 (patch) | |
tree | 3731f61cf82451b6892cf1368701e57e35d92908 /drivers/net/macvtap.c | |
parent | c5908939b2738bafe1b309bc2465cb9f2e6184c5 (diff) | |
parent | 6dfbd87a20a737641ef228230c77f4262434fa24 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/bnx2x/bnx2x_cmn.c
Diffstat (limited to 'drivers/net/macvtap.c')
-rw-r--r-- | drivers/net/macvtap.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c index 2300e4599520..6696e56e6320 100644 --- a/drivers/net/macvtap.c +++ b/drivers/net/macvtap.c | |||
@@ -530,8 +530,9 @@ static ssize_t macvtap_get_user(struct macvtap_queue *q, | |||
530 | vnet_hdr_len = q->vnet_hdr_sz; | 530 | vnet_hdr_len = q->vnet_hdr_sz; |
531 | 531 | ||
532 | err = -EINVAL; | 532 | err = -EINVAL; |
533 | if ((len -= vnet_hdr_len) < 0) | 533 | if (len < vnet_hdr_len) |
534 | goto err; | 534 | goto err; |
535 | len -= vnet_hdr_len; | ||
535 | 536 | ||
536 | err = memcpy_fromiovecend((void *)&vnet_hdr, iv, 0, | 537 | err = memcpy_fromiovecend((void *)&vnet_hdr, iv, 0, |
537 | sizeof(vnet_hdr)); | 538 | sizeof(vnet_hdr)); |