]> git.ipfire.org Git - thirdparty/linux.git/commit
octeontx2-pf: fix "UBSAN: shift-out-of-bounds error"
authorAnshumali Gaur <agaur@marvell.com>
Fri, 19 Dec 2025 06:22:26 +0000 (11:52 +0530)
committerPaolo Abeni <pabeni@redhat.com>
Mon, 29 Dec 2025 15:46:19 +0000 (16:46 +0100)
commit85f4b0c650d9f9db10bda8d3acfa1af83bf78cf7
tree3205ab8e712a498a11c936f3af76b8a7a9d974d9
parent4d1442979e4a53b9457ce1e373e187e1511ff688
octeontx2-pf: fix "UBSAN: shift-out-of-bounds error"

This patch ensures that the RX ring size (rx_pending) is not
set below the permitted length. This avoids UBSAN
shift-out-of-bounds errors when users passes small or zero
ring sizes via ethtool -G.

Fixes: d45d8979840d ("octeontx2-pf: Add basic ethtool support")
Signed-off-by: Anshumali Gaur <agaur@marvell.com>
Link: https://patch.msgid.link/20251219062226.524844-1-agaur@marvell.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c