]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitfce975f4e6654763772f3027d9fe32b13dff7be2
tree6a278dde025950740c93261759564512b1f6662f
parent154dff9e57412d5afaefa26f2d58b33d02bd1f0c
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