mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-19 13:22:03 +00:00
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>
This commit is contained in:
parent
d66016a777
commit
9403cd7cbb
3 changed files with 2 additions and 5 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue