Revert "netvsc: optimize calculation of number of slots"
authorstephen hemminger <stephen@networkplumber.org>
Tue, 25 Jul 2017 04:03:19 +0000 (21:03 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Jul 2017 04:26:08 +0000 (21:26 -0700)
commit80d887dbb673f007938c467fbfa118bba3e9f37d
tree5544cc0e32fe73763be1645c730d98760ef36e50
parent6cee9d649cd1824a4d9ce6940dd716f2bf2ef24f
Revert "netvsc: optimize calculation of number of slots"

The logic for computing page buffer scatter does not take into
account the impact of compound pages. Therefore the optimization
to compute number of slots was incorrect and could cause stack
corruption a skb was sent with lots of fragments from huge pages.

This reverts commit 60b86665af0dfbeebda8aae43f0ba451cd2dcfe5.

Fixes: 60b86665af0d ("netvsc: optimize calculation of number of slots")
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/hyperv/netvsc_drv.c