aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi/mpiutil.c
diff options
context:
space:
mode:
authorMingming Cao <[email protected]>2020-08-25 13:26:41 -0400
committerDavid S. Miller <[email protected]>2020-08-25 17:28:14 -0700
commit9f13457377907fa253aef560e1a37e1ca4197f9b (patch)
treeaa0c308053539adcc7f419e58799e5725d65d271 /lib/mpi/mpiutil.c
parent2c6500e82e5190b038f0b79f85a20da55bdd4b86 (diff)
ibmvnic fix NULL tx_pools and rx_tools issue at do_reset
At the time of do_rest, ibmvnic tries to re-initalize the tx_pools and rx_pools to avoid re-allocating the long term buffer. However there is a window inside do_reset that the tx_pools and rx_pools were freed before re-initialized making it possible to deference null pointers. This patch fix this issue by always check the tx_pool and rx_pool are not NULL after ibmvnic_login. If so, re-allocating the pools. This will avoid getting into calling reset_tx/rx_pools with NULL adapter tx_pools/rx_pools pointer. Also add null pointer check in reset_tx_pools and reset_rx_pools to safe handle NULL pointer case. Signed-off-by: Mingming Cao <[email protected]> Signed-off-by: Dany Madden <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'lib/mpi/mpiutil.c')
0 files changed, 0 insertions, 0 deletions