Commit 9f13457
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 <mmc@linux.vnet.ibm.com>
Signed-off-by: Dany Madden <drt@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent 2c6500e commit 9f13457
1 file changed
+14
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
479 | 479 | | |
480 | 480 | | |
481 | 481 | | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
482 | 485 | | |
483 | 486 | | |
484 | 487 | | |
| |||
649 | 652 | | |
650 | 653 | | |
651 | 654 | | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
652 | 658 | | |
653 | 659 | | |
654 | 660 | | |
| |||
2011 | 2017 | | |
2012 | 2018 | | |
2013 | 2019 | | |
2014 | | - | |
| 2020 | + | |
| 2021 | + | |
| 2022 | + | |
| 2023 | + | |
2015 | 2024 | | |
2016 | 2025 | | |
2017 | 2026 | | |
| |||
2024 | 2033 | | |
2025 | 2034 | | |
2026 | 2035 | | |
| 2036 | + | |
| 2037 | + | |
2027 | 2038 | | |
2028 | 2039 | | |
2029 | 2040 | | |
2030 | 2041 | | |
| 2042 | + | |
| 2043 | + | |
2031 | 2044 | | |
2032 | 2045 | | |
2033 | 2046 | | |
| |||
0 commit comments