diff options
author | David S. Miller <davem@davemloft.net> | 2011-03-10 14:26:00 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-10 14:26:00 -0800 |
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, vnet_hdr_len = q->vnet_hdr_sz; err = -EINVAL; - if ((len -= vnet_hdr_len) < 0) + if (len < vnet_hdr_len) goto err; + len -= vnet_hdr_len; err = memcpy_fromiovecend((void *)&vnet_hdr, iv, 0, sizeof(vnet_hdr)); |