summaryrefslogtreecommitdiff
path: root/scripts/basic/split-include.c
diff options
context:
space:
mode:
authorJoe Damato <joe@dama.to>2026-09-01 18:56:47 -0700
committerPaolo Abeni <pabeni@redhat.com>2026-09-08 10:47:03 +0200
commit961e2a17c5e3559b3f8654d2daabdd25a42e770a (patch)
tree7609227e357a2f3ddee07c16600be5fb7182b49f /scripts/basic/split-include.c
parentb814dfbfeb0a68c9a52073f2caa05a2d5247a329 (diff)
downloadlinux-961e2a17c5e3559b3f8654d2daabdd25a42e770a.tar.gz
linux-961e2a17c5e3559b3f8654d2daabdd25a42e770a.zip
bnxt_en: Handle buffer allocation failure in bnxt_rx_ring_reset()
bnxt_rx_ring_reset() frees the ring buffers and then reallocates them, ignoring the result. bnxt_alloc_one_rx_ring() can fail in bnxt_alloc_one_tpa_info_data(), which returns -ENOMEM on the first failed allocation and leaves the remaining rxr->rx_tpa[] entries zeroed. The error isn't propagated up, so the loop in bnxt_rx_ring_reset continues and at the end the code re-enables TPA with partially unallocated rx_tpa array. This means that when the agg_id from hardware is mapped to a SW index in rxr->rx_tpa[], an uninitialized slot can be chosen which would hand a zero DMA address to the device. Fix this by falling back to a global reset, which is what the existing code already does when other functions fail, but unlike the other failure cases this particular failure has to return because TPA can't be re-enabled since the allocation failed. Fixes: 8fbf58e17dce ("bnxt_en: Implement RX ring reset in response to buffer errors.") Reported-by: Sashiko <sashiko-bot+sashiko@kernel.org> Link: https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260828190900.1767611-1-joe%40dama.to Cc: stable@vger.kernel.org Signed-off-by: Joe Damato <joe@dama.to> Link: https://patch.msgid.link/20260902015652.2421609-5-joe@dama.to Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'scripts/basic/split-include.c')
0 files changed, 0 insertions, 0 deletions