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)
commitef31bef6216db76950c38f1993b45953402f4c63
tree044be8b3a0a0f4cd365dbf107576a176bdeb0e0b
parentafd465030acb4098abcb6b965a5aebc7ea2209e0
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 45326342), 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