diff options
author | Joel Becker <jlbec@evilplan.org> | 2011-03-28 12:44:26 -0400 |
---|---|---|
committer | Joel Becker <jlbec@evilplan.org> | 2011-03-28 12:44:26 -0400 |
commit | 99bdc3880c611c7f2061fbd5372ef81b40217e26 (patch) | |
tree | ef68a53e28e9ee53ce9db3642bab5fa5b3d44866 /drivers/net/macvtap.c | |
parent | ed59992e8d91b70053c53d846a76f7e1ac000454 (diff) | |
parent | b4e1b7e88b2c87c358c2a88bec0c76d25accc604 (diff) |
Merge branch 'mlog_replace_for_39' of git://repo.or.cz/taoma-kernel into ocfs2-merge-window-fix
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 5933621ac3ff..fc27a9926d9e 100644 --- a/drivers/net/macvtap.c +++ b/drivers/net/macvtap.c | |||
@@ -528,8 +528,9 @@ static ssize_t macvtap_get_user(struct macvtap_queue *q, | |||
528 | vnet_hdr_len = q->vnet_hdr_sz; | 528 | vnet_hdr_len = q->vnet_hdr_sz; |
529 | 529 | ||
530 | err = -EINVAL; | 530 | err = -EINVAL; |
531 | if ((len -= vnet_hdr_len) < 0) | 531 | if (len < vnet_hdr_len) |
532 | goto err; | 532 | goto err; |
533 | len -= vnet_hdr_len; | ||
533 | 534 | ||
534 | err = memcpy_fromiovecend((void *)&vnet_hdr, iv, 0, | 535 | err = memcpy_fromiovecend((void *)&vnet_hdr, iv, 0, |
535 | sizeof(vnet_hdr)); | 536 | sizeof(vnet_hdr)); |