hv_netvsc: Add initialization of tx_table in netvsc_device_add()
authorHaiyang Zhang <haiyangz@microsoft.com>
Mon, 14 May 2018 22:32:03 +0000 (15:32 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 May 2018 14:17:26 +0000 (16:17 +0200)
commitef1c5903cd2a44c161de86f862182afddb4a9677
treec1701c35c1f6c7c1fce7edf3188e143b308e812c
parentb3a303352e5142da2405d59d70aaf6aad04ef932
hv_netvsc: Add initialization of tx_table in netvsc_device_add()

[ Commit 6b0cbe315868d613123cf387052ccda5f09d49ea upstream. ]

tx_table is part of the private data of kernel net_device. It is only
zero-ed out when allocating net_device.

We may recreate netvsc_device w/o recreating net_device, so the private
netdev data, including tx_table, are not zeroed. It may contain channel
numbers for the older netvsc_device.

This patch adds initialization of tx_table each time we recreate
netvsc_device.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/hyperv/netvsc.c