]> 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)
commitf6ea8f445d6dc8e58b16c77749e74a328dd4953d
tree4d887b0f261c23862d847c435c7bf94b671ad91c
parentbb1d956ce46249fd1fa6a874b10dc4dfaa7babc3
hv_netvsc: Fix a bug in netvsc_start_xmit()

Commit d5daf9d942f79808c7253d009615f99e36707eac 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