aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tun.c
diff options
context:
space:
mode:
authorJarno Rajahalme <jarno@ovn.org>2016-11-18 15:40:40 -0800
committerDavid S. Miller <davem@davemloft.net>2016-11-19 10:37:03 -0500
commit9403cd7cbb08aa3709c632decafa2014c8ed96e6 (patch)
treed15f6f474b928920f7969793fdde233ad187ffac /drivers/net/tun.c
parentvirtio_net.h: Fix comment. (diff)
downloadlinux-dev-9403cd7cbb08aa3709c632decafa2014c8ed96e6.tar.xz
linux-dev-9403cd7cbb08aa3709c632decafa2014c8ed96e6.zip
virtio_net: Do not clear memory for struct virtio_net_hdr twice.
virtio_net_hdr_from_skb() clears the memory for the header, so there is no point for the callers to do the same. Signed-off-by: Jarno Rajahalme <jarno@ovn.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tun.c')
-rw-r--r--drivers/net/tun.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 3b8d8cc6d2ea..64e694c68d99 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -1360,8 +1360,7 @@ static ssize_t tun_put_user(struct tun_struct *tun,
}
if (vnet_hdr_sz) {
- struct virtio_net_hdr gso = { 0 }; /* no info leak */
- int ret;
+ struct virtio_net_hdr gso;
if (iov_iter_count(iter) < vnet_hdr_sz)
return -EINVAL;