]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
ibmvnic: Allocate statistics buffers during probe
authorThomas Falcon <tlfalcon@linux.vnet.ibm.com>
Tue, 27 Feb 2018 00:10:56 +0000 (18:10 -0600)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 27 Aug 2018 14:40:05 +0000 (16:40 +0200)
commit9fc0a0761a41ffae0e719aaf69d87f2ad8517c2c
tree298ad388c8899a7515c98001ee757ecfc8ad9012
parent1a280d74ace24ca6f71930efeb8a4a01318f155d
ibmvnic: Allocate statistics buffers during probe

BugLink: http://bugs.launchpad.net/bugs/1786352
[ Upstream commit 53cc7721fdf12e649994cfb7d8f562acb0e4510b ]

Currently, buffers holding individual queue statistics are allocated
when the device is opened. If an ibmvnic interface is hotplugged or
initialized but never opened, an attempt to get statistics with
ethtool will result in a kernel panic.

Since the driver allocates a constant number, the maximum supported
queues, of buffers, these can be allocated during device probe and
freed when the device is hot-unplugged or the module is removed.

Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/ethernet/ibm/ibmvnic.c