]> asedeno.scripts.mit.edu Git - linux.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)
committerDavid S. Miller <davem@davemloft.net>
Tue, 27 Feb 2018 19:31:19 +0000 (14:31 -0500)
commit53cc7721fdf12e649994cfb7d8f562acb0e4510b
tree26693949da0f8eb7002e540bb4ed41e788421094
parentecba616e041e64840d14e294b089ca355614b7fb
ibmvnic: Allocate statistics buffers during probe

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>
drivers/net/ethernet/ibm/ibmvnic.c