]> git.baikalelectronics.ru Git - kernel.git/commit
hv_netvsc: Fix the array sizes to be max supported channels
authorHaiyang Zhang <haiyangz@microsoft.com>
Wed, 23 Mar 2016 16:43:10 +0000 (09:43 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 23 Mar 2016 18:38:55 +0000 (14:38 -0400)
commit31ba2a3c556dfe62bb76c3de0606e6445ac8e080
treeb1177296ef91d34aadc8307915de09240e76eaf9
parent561c9084d4e98f1ec125fec62a9aae99412f24f4
hv_netvsc: Fix the array sizes to be max supported channels

The VRSS_CHANNEL_MAX is the max number of channels supported by Hyper-V
hosts. We use it for the related array sizes instead of using NR_CPUS,
which may be set to several thousands.
This patch reduces possible memory allocation failures.

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/hyperv_net.h
drivers/net/hyperv/rndis_filter.c