aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/fpga/tests/fpga-bridge-test.c
diff options
context:
space:
mode:
authorMeghana Malladi <[email protected]>2025-04-15 09:05:42 +0000
committerPaolo Abeni <[email protected]>2025-04-17 10:11:24 +0000
commit8ed2fa661350f0b49edb765d18173b5c766c3686 (patch)
tree2c78f5007314180cf537dda1ebd51eb8f6fc349b /drivers/fpga/tests/fpga-bridge-test.c
parentnet: ti: icssg-prueth: Fix kernel warning while bringing down network interface (diff)
downloadkernel-8ed2fa661350f0b49edb765d18173b5c766c3686.tar.gz
kernel-8ed2fa661350f0b49edb765d18173b5c766c3686.zip
net: ti: icssg-prueth: Fix possible NULL pointer dereference inside emac_xmit_xdp_frame()
There is an error check inside emac_xmit_xdp_frame() function which is called when the driver wants to transmit XDP frame, to check if the allocated tx descriptor is NULL, if true to exit and return ICSSG_XDP_CONSUMED implying failure in transmission. In this case trying to free a descriptor which is NULL will result in kernel crash due to NULL pointer dereference. Fix this error handling and increase netdev tx_dropped stats in the caller of this function if the function returns ICSSG_XDP_CONSUMED. Fixes: 62aa3246f462 ("net: ti: icssg-prueth: Add XDP support") Reported-by: Dan Carpenter <[email protected]> Closes: https://lore.kernel.org/all/[email protected]/ Signed-off-by: Meghana Malladi <[email protected]> Reviewed-by: Simon Horman <[email protected]> Reviewed-by: Roger Quadros <[email protected]> Reviewed-by: Jacob Keller <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
Diffstat (limited to 'drivers/fpga/tests/fpga-bridge-test.c')
0 files changed, 0 insertions, 0 deletions