diff options
author | Meghana Malladi <m-malladi@ti.com> | 2025-04-15 12:05:42 +0300 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2025-04-17 13:11:24 +0300 |
commit | 8ed2fa661350f0b49edb765d18173b5c766c3686 (patch) | |
tree | 2c78f5007314180cf537dda1ebd51eb8f6fc349b /tools/perf/scripts/python/gecko.py | |
parent | 75bc744466444ef417b5f709f72b91c83301bcd1 (diff) | |
download | linux-8ed2fa661350f0b49edb765d18173b5c766c3686.tar.xz |
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 <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/all/70d8dd76-0c76-42fc-8611-9884937c82f5@stanley.mountain/
Signed-off-by: Meghana Malladi <m-malladi@ti.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Roger Quadros <rogerq@kernel.org>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://patch.msgid.link/20250415090543.717991-3-m-malladi@ti.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/gecko.py')
0 files changed, 0 insertions, 0 deletions