]> git.baikalelectronics.ru Git - kernel.git/commit
ibmvnic: Fix login buffer memory leaks
authorThomas Falcon <tlfalcon@linux.vnet.ibm.com>
Wed, 14 Feb 2018 00:23:40 +0000 (18:23 -0600)
committerDavid S. Miller <davem@davemloft.net>
Wed, 14 Feb 2018 19:39:09 +0000 (14:39 -0500)
commitb28e72ab8b053dd327087daffdb4f2ded21bc643
tree9450542fafae4cb7f69678ec4c2b1fde3397482a
parentb5b87bb7fcdda633720c2ac3978974ac5967885b
ibmvnic: Fix login buffer memory leaks

During device bringup, the driver exchanges login buffers with
firmware. These buffers contain information such number of TX
and RX queues alloted to the device, RX buffer size, etc. These
buffers weren't being properly freed on device reset or close.

We can free the buffer we send to firmware as soon as we get
a response. There is information in the response buffer that
the driver needs for normal operation so retain it until the
next reset or removal.

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