ethtool: fec: sanitize ethtool_fecparam->active_fec
authorJakub Kicinski <kuba@kernel.org>
Thu, 25 Mar 2021 01:11:58 +0000 (18:11 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 25 Mar 2021 23:46:53 +0000 (16:46 -0700)
commitd3b37fc805d9ef697451730ebdfc7e35e6c2ace8
tree6a278dde025950740c93261759564512b1f6662f
parent240e114411e74d2ee8121643e0c67717eb7c6982
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.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/ethtool.h
net/ethtool/ioctl.c