]> git.baikalelectronics.ru Git - kernel.git/commit
hv_netvsc: Fix a bug in netvsc_start_xmit()
authorKY Srinivasan <kys@microsoft.com>
Wed, 29 Apr 2015 00:59:48 +0000 (17:59 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 29 Apr 2015 19:20:39 +0000 (15:20 -0400)
commit2f03d7124b69fc33f8995e1f059a5f414571127c
tree4d887b0f261c23862d847c435c7bf94b671ad91c
parenta153bfe46461834e1ba6bb22c91eb8e164eed2ae
hv_netvsc: Fix a bug in netvsc_start_xmit()

Commit 6aaaa769bf317d48c22a4c3afb5453d2d9f94c91 eliminated memory
allocation in the packet send path:

    "hv_netvsc: Eliminate memory allocation in the packet send path

    The network protocol used to communicate with the host is the remote ndis (rndis)
    protocol. We need to decorate each outgoing packet with a rndis header and
    additional rndis state (rndis per-packet state). To manage this state, we
    currently allocate memory in the transmit path. Eliminate this allocation by
    requesting additional head room in the skb."

This commit introduced a bug since it did not account for the case if the skb
was cloned. Fix this bug.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Tested-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/hyperv/hyperv_net.h
drivers/net/hyperv/netvsc.c
drivers/net/hyperv/netvsc_drv.c