History

ethtool: fec: sanitize ethtool_fecparam->active_fec

struct ethtool_fecparam::active_fec is a GET-only field, all in-tree drivers correctly ignore it on SET. Clear the field on SET to avoid any confusion. Again, we can't reject non-zero now since ethtool user space does not zero-init the param correctly.

Jakub Kicinski committed 5 years ago

Commit d3b37fc1 parent 240e1142 files · +2 −1Browse files

Showing the changes to include/uapi (1 of 2 files). Show all

Unified · Split

include/uapi/linux/ethtool.h+1−1
@@ -1378,7 +1378,7 @@ struct ethtool_per_queue_op { · 1377 unmodified lines
1378/**1378/**
1379 * struct ethtool_fecparam - Ethernet forward error correction(fec) parameters1379 * struct ethtool_fecparam - Ethernet forward error correction(fec) parameters
1380 * @cmd: Command number = %ETHTOOL_GFECPARAM or %ETHTOOL_SFECPARAM1380 * @cmd: Command number = %ETHTOOL_GFECPARAM or %ETHTOOL_SFECPARAM
1381 * @active_fec: FEC mode which is active on the port1381 * @active_fec: FEC mode which is active on the port, GET only.
1382 * @fec: Bitmask of supported/configured FEC modes1382 * @fec: Bitmask of supported/configured FEC modes
1383 * @reserved: Reserved for future extensions, ignore on GET, write 0 for SET.1383 * @reserved: Reserved for future extensions, ignore on GET, write 0 for SET.
1384 */1384 */