macvtap: signal truncated packets
authorJason Wang <jasowang@redhat.com>
Mon, 9 Dec 2013 10:25:17 +0000 (18:25 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Dec 2013 03:06:49 +0000 (22:06 -0500)
macvtap_put_user() never return a value grater than iov length, this in fact
bypasses the truncated checking in macvtap_recvmsg(). Fix this by always
returning the size of packet plus the possible vlan header to let the truncated
checking work.

Cc: Vlad Yasevich <vyasevich@gmail.com>
Cc: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/macvtap.c

Simple merge