]> git.baikalelectronics.ru Git - kernel.git/commit
hyperv: Fix the total_data_buflen in send path
authorHaiyang Zhang <haiyangz@microsoft.com>
Wed, 22 Oct 2014 20:47:18 +0000 (13:47 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 22 Oct 2014 21:58:50 +0000 (17:58 -0400)
commit11984ae1bed74c38a6bf050bff3ee045d4ab1d4b
treeac54257c97a519c78793b5207bb61562bf4c8963
parent6c4b5ae1a96903c2d0fb4be3496ff6f4bc2a7817
hyperv: Fix the total_data_buflen in send path

total_data_buflen is used by netvsc_send() to decide if a packet can be put
into send buffer. It should also include the size of RNDIS message before the
Ethernet frame. Otherwise, a messge with total size bigger than send_section_size
may be copied into the send buffer, and cause data corruption.

[Request to include this patch to the Stable branches]

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>
drivers/net/hyperv/netvsc_drv.c