Re: [PATCH][next] ethtool: ioctl: Use array_size() in copy_to_user()

From: David Miller
Date: Wed Jun 17 2020 - 18:05:26 EST


From: "Gustavo A. R. Silva" <gustavoars@xxxxxxxxxx>
Date: Mon, 15 Jun 2020 18:01:07 -0500

> 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@xxxxxxxxxx>

Applied to net-next.