diff options
author | Roger Quadros <[email protected]> | 2024-08-29 15:03:20 +0300 |
---|---|---|
committer | Paolo Abeni <[email protected]> | 2024-09-03 10:43:46 +0200 |
commit | 0a50c35277f96481a5a6ed5faf347f282040c57d (patch) | |
tree | 3518d2a5aa81500e697646068b6905ea80321d05 /tools/testing/selftests/bpf/progs/test_autoload.c | |
parent | 5e24db550bd6f484d2c7687ee488708260e1f84a (diff) |
net: ethernet: ti: am65-cpsw: Fix NULL dereference on XDP_TX
If number of TX queues are set to 1 we get a NULL pointer
dereference during XDP_TX.
~# ethtool -L eth0 tx 1
~# ./xdp-trafficgen udp -A <ipv6-src> -a <ipv6-dst> eth0 -t 2
Transmitting on eth0 (ifindex 2)
[ 241.135257] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000030
Fix this by using actual TX queues instead of max TX queues
when picking the TX channel in am65_cpsw_ndo_xdp_xmit().
Fixes: 8acacc40f733 ("net: ethernet: ti: am65-cpsw: Add minimal XDP support")
Signed-off-by: Roger Quadros <[email protected]>
Reviewed-by: Jacob Keller <[email protected]>
Acked-by: Julien Panis <[email protected]>
Reviewed-by: MD Danish Anwar <[email protected]>
Signed-off-by: Paolo Abeni <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_autoload.c')
0 files changed, 0 insertions, 0 deletions