]> git.baikalelectronics.ru Git - kernel.git/commit
ethtool: ioctl: Use array_size() in copy_to_user()
authorGustavo A. R. Silva <gustavoars@kernel.org>
Mon, 15 Jun 2020 23:01:07 +0000 (18:01 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 17 Jun 2020 22:04:57 +0000 (15:04 -0700)
commit279968ed219571d8c14a4d50b8b131ccd3469325
treebcbfc7215836963205456fb4bc20a83e869d59f2
parent1a483261e9da8139ab5d34220b699a91d012282d
ethtool: ioctl: Use array_size() in copy_to_user()

Use array_size() helper instead of the open-coded version in
copy_to_user(). These sorts of multiplication factors need to
be wrapped in array_size().

This issue was found with the help of Coccinelle and, audited and fixed
manually.

Addresses-KSPP-ID: https://github.com/KSPP/linux/issues/83
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ethtool/ioctl.c