diff options
author | Haiyang Zhang <haiyangz@microsoft.com> | 2015-04-06 15:22:54 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-04-07 18:45:33 -0400 |
commit | ee90b81203a91d4e5385622811ee7872b5bcfe76 (patch) | |
tree | 50d211e19cbda5786e09ddcfe287da64d6d2c91a /drivers/net/hyperv/netvsc.c | |
parent | 721514222db13498613706709409c21c105e0f4a (diff) | |
download | blackbird-op-linux-ee90b81203a91d4e5385622811ee7872b5bcfe76.tar.gz blackbird-op-linux-ee90b81203a91d4e5385622811ee7872b5bcfe76.zip |
hv_netvsc: Fix the packet free when it is in skb headroom
In the two places changed, we now use netvsc_xmit_completion() which properly
frees hv_netvsc_packet in or not in skb headroom.
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hyperv/netvsc.c')
-rw-r--r-- | drivers/net/hyperv/netvsc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c index 7e83c6ad4bb5..4d4d497d5762 100644 --- a/drivers/net/hyperv/netvsc.c +++ b/drivers/net/hyperv/netvsc.c @@ -878,7 +878,9 @@ int netvsc_send(struct hv_device *device, packet->send_buf_index = section_index; packet->total_data_buflen += msd_len; - kfree(msdp->pkt); + if (msdp->pkt) + netvsc_xmit_completion(msdp->pkt); + if (packet->xmit_more) { msdp->pkt = packet; msdp->count++; @@ -902,7 +904,7 @@ int netvsc_send(struct hv_device *device, if (m_ret != 0) { netvsc_free_send_slot(net_device, msd_send->send_buf_index); - kfree(msd_send); + netvsc_xmit_completion(msd_send); } } |