b88140da4f
[ Upstream commit d007caaaf052f82ca2340d4c7b32d04a3f5dbf3f ] When flow_indr_dev_register() fails, bnxt_init_tc will free bp->tc_info through kfree(). However, the caller function bnxt_init_one() will ignore this failure and call bnxt_shutdown_tc() on failure of bnxt_dl_register(), where a use-after-free happens. Fix this issue by setting bp->tc_info to NULL after kfree(). Fixes: 627c89d00fb9 ("bnxt_en: flow_offload: offload tunnel decap rules via indirect callbacks") Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn> Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com> Reviewed-by: Michael Chan <michael.chan@broadcom.com> Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com> Link: https://lore.kernel.org/r/20231204024004.8245-1-dinghao.liu@zju.edu.cn Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org> |
||
---|---|---|
.. | ||
bnxt.c | ||
bnxt.h | ||
bnxt_coredump.h | ||
bnxt_dcb.c | ||
bnxt_dcb.h | ||
bnxt_debugfs.c | ||
bnxt_debugfs.h | ||
bnxt_devlink.c | ||
bnxt_devlink.h | ||
bnxt_dim.c | ||
bnxt_ethtool.c | ||
bnxt_ethtool.h | ||
bnxt_fw_hdr.h | ||
bnxt_hsi.h | ||
bnxt_nvm_defs.h | ||
bnxt_sriov.c | ||
bnxt_sriov.h | ||
bnxt_tc.c | ||
bnxt_tc.h | ||
bnxt_ulp.c | ||
bnxt_ulp.h | ||
bnxt_vfr.c | ||
bnxt_vfr.h | ||
bnxt_xdp.c | ||
bnxt_xdp.h | ||
Makefile |