diff options
author | Gal Pressman <[email protected]> | 2024-12-02 18:48:05 +0200 |
---|---|---|
committer | Jakub Kicinski <[email protected]> | 2024-12-03 18:42:28 -0800 |
commit | 94071909477677fc2a1abf3fb281f203f66cf3ca (patch) | |
tree | 2dcc6b4f3934ef7cef62b330da3608330f70436a /tools/testing/selftests/bpf/prog_tests/autoload.c | |
parent | 3d501f562f63b290351169e3e9931ffe3d57b2ae (diff) |
ethtool: Fix access to uninitialized fields in set RXNFC command
The check for non-zero ring with RSS is only relevant for
ETHTOOL_SRXCLSRLINS command, in other cases the check tries to access
memory which was not initialized by the userspace tool. Only perform the
check in case of ETHTOOL_SRXCLSRLINS.
Without this patch, filter deletion (for example) could statistically
result in a false error:
# ethtool --config-ntuple eth3 delete 484
rmgr: Cannot delete RX class rule: Invalid argument
Cannot delete classification rule
Fixes: 9e43ad7a1ede ("net: ethtool: only allow set_rxnfc with rss + ring_cookie if driver opts in")
Link: https://lore.kernel.org/netdev/[email protected]/
Reviewed-by: Dragos Tatulea <[email protected]>
Reviewed-by: Tariq Toukan <[email protected]>
Signed-off-by: Gal Pressman <[email protected]>
Reviewed-by: Edward Cree <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/autoload.c')
0 files changed, 0 insertions, 0 deletions