tun: Fix GSO meta-data handling in tun_get_user
authorHerbert Xu <herbert@gondor.apana.org.au>
Sun, 30 Nov 2014 10:03:31 +0000 (18:03 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 3 Dec 2014 04:53:47 +0000 (20:53 -0800)
commitd8febb77b52ebddb9bd03ccaa5b61005e3a45a85
tree1ce3bd20619b430fbc357715fd7eaa8c190e045d
parentcbc24658baac5ca96d20d4a6ca9a8c41581a6e63
tun: Fix GSO meta-data handling in tun_get_user

When we write the GSO meta-data in tun_get_user we end up advancing
the IO vector twice, thus exhausting the user buffer before we can
finish writing the packet.

Fixes: f5ff53b4d97c ("{macvtap,tun}_get_user(): switch to iov_iter")
Reported-by: Marcelo Ricardo Leitner <mleitner@redhat.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tun.c