net/bnxt: fix crash caused by error recovery
authorSomnath Kotur <somnath.kotur@broadcom.com>
Fri, 19 Nov 2021 03:50:41 +0000 (09:20 +0530)
committerAjit Khaparde <ajit.khaparde@broadcom.com>
Mon, 22 Nov 2021 07:12:24 +0000 (08:12 +0100)
commit720b55ad278ecc56717e73047427b9e76333e928
tree013b6efbea15af39053c22bf3dcbf86a1bf9663a
parente806385c6deaba31b7f81931c44e7867a2ebdfb7
net/bnxt: fix crash caused by error recovery

bnxt_stop_rxtx() does not stop data path processing as intended
as it does not update the recently introduced fast-path pointers
'(struct rte_eth_fp_ops)->rx_pkt_burst'. Since both the burst routines
only use the fast-path pointer, the real burst routines get invoked
instead of the dummy ones set by bnxt_stop_rxtx() leading to crashes
in the data path (e.g. dereferencing freed structures)

Fix the segfault by updating the fast-path pointer as well

Fixes: c87d435a4d79 ("ethdev: copy fast-path API into separate structure")

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt_cpr.c
drivers/net/bnxt/bnxt_ethdev.c