]> git.baikalelectronics.ru Git - kernel.git/commit
net/hyperv: Fix data corruption in rndis_filter_receive()
authorHaiyang Zhang <haiyangz@microsoft.com>
Mon, 12 Mar 2012 10:20:49 +0000 (10:20 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Mar 2012 00:06:48 +0000 (17:06 -0700)
commite5b35936fdd409f77cb9759b6d3e3f5462d95325
tree044be8b3a0a0f4cd365dbf107576a176bdeb0e0b
parent0ba8bde631d796dcfafb3a5c632c14530f6a70a4
net/hyperv: Fix data corruption in rndis_filter_receive()

Limiting the memcpy to be the sizeof(struct rndis_message) can truncate
the message if there are Per-Packet-Info or Out-of-Band data.

In my earlier patch (commit efcc1c25), the unnecessary kmap_atomic and
kunmap_atomic surrounding this memcpy have been removed because the memory
in the receive buffer is always mapped. This memcpy is not necessary
either. To fix the bug, I removed the memcpy.

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/rndis_filter.c