summaryrefslogtreecommitdiffstats
path: root/include/linux/virtio_net.h
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 /include/linux/virtio_net.h
parentd66016a77757b004b8637f44d87bedfc4a47b89c (diff)
downloadblackbird-op-linux-9403cd7cbb08aa3709c632decafa2014c8ed96e6.tar.gz
blackbird-op-linux-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 'include/linux/virtio_net.h')
-rw-r--r--include/linux/virtio_net.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h
index 74f1e3363506..66204007d7ac 100644
--- a/include/linux/virtio_net.h
+++ b/include/linux/virtio_net.h
@@ -58,7 +58,7 @@ static inline int virtio_net_hdr_from_skb(const struct sk_buff *skb,
struct virtio_net_hdr *hdr,
bool little_endian)
{
- memset(hdr, 0, sizeof(*hdr));
+ memset(hdr, 0, sizeof(*hdr)); /* no info leak */
if (skb_is_gso(skb)) {
struct skb_shared_info *sinfo = skb_shinfo(skb);
OpenPOWER on IntegriCloud