]> git.baikalelectronics.ru Git - kernel.git/commit
ibmvnic: Allocate and request vpd in init_resources
authorJohn Allen <jallen@linux.vnet.ibm.com>
Thu, 18 Jan 2018 22:27:58 +0000 (16:27 -0600)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Jan 2018 20:46:55 +0000 (15:46 -0500)
commit63de61238516de446136c0a1213b2ae781534921
treedbccddd469066137cb152eb96789184fc591267d
parentd8f9bbc920d8fc5d8f6868ad1b4aa8568cbc1178
ibmvnic: Allocate and request vpd in init_resources

In reset events in which our memory allocations need to be reallocated,
VPD data is being freed, but never reallocated. This can cause issues if
we later attempt to access that memory or reset and attempt to free the
memory. This patch moves the allocation of the VPD data to init_resources
so that it will be symmetrically freed during release resources.

Signed-off-by: John Allen <jallen@linux.vnet.ibm.com>
Reviewed-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ibm/ibmvnic.c