]> git.baikalelectronics.ru Git - kernel.git/commit
ethtool: fec: sanitize ethtool_fecparam->reserved
authorJakub Kicinski <kuba@kernel.org>
Thu, 25 Mar 2021 01:11:57 +0000 (18:11 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 25 Mar 2021 23:46:53 +0000 (16:46 -0700)
commit1e936a708b3c9d01355e866e15fbc434d58a03a5
treeb147d614c9081f170e9b8b357e82750dd997dc3a
parentb092222ab0a0e318a337e9d9034fad4ffb15737c
ethtool: fec: sanitize ethtool_fecparam->reserved

struct ethtool_fecparam::reserved is never looked at by the core.
Make sure it's actually 0. Unfortunately we can't return an error
because old ethtool doesn't zero-initialize the structure for SET.
On GET we can be more verbose, there are no in tree (ab)users.

Fix up the kdoc on the structure. Remove the mention of FEC
bypass. Seems like a niche thing to configure in the first
place.

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