]> 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)
commita4a1e93c60214123dd30608879b0305627af728f
tree6a278dde025950740c93261759564512b1f6662f
parent1e936a708b3c9d01355e866e15fbc434d58a03a5
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