diff options
author | 2019-04-25 22:31:52 -0400 | |
---|---|---|
committer | 2019-04-27 17:00:18 -0400 | |
commit | 1f83391bd6fc48f92f627b0ec0bce686d100c6a5 (patch) | |
tree | df19e6efe993d6bdcd7bf782091a97fe7b5bff60 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | bnxt_en: Free short FW command HWRM memory in error path in bnxt_init_one() (diff) | |
download | wireguard-linux-1f83391bd6fc48f92f627b0ec0bce686d100c6a5.tar.xz wireguard-linux-1f83391bd6fc48f92f627b0ec0bce686d100c6a5.zip |
bnxt_en: Fix possible crash in bnxt_hwrm_ring_free() under error conditions.
If we encounter errors during open and proceed to clean up,
bnxt_hwrm_ring_free() may crash if the rings we try to free have never
been allocated. bnxt_cp_ring_for_rx() or bnxt_cp_ring_for_tx()
may reference pointers that have not been allocated.
Fix it by checking for valid fw_ring_id first before calling
bnxt_cp_ring_for_rx() or bnxt_cp_ring_for_tx().
Fixes: 2c61d2117ecb ("bnxt_en: Add helper functions to get firmware CP ring ID.")
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions