Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e1b90c41 authored by Jeff Garzik's avatar Jeff Garzik
Browse files

[NET] ethtool: fix oops by testing correct struct member



Noticed by Willy Tarreau.

Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 82d6897f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -437,7 +437,7 @@ static int ethtool_set_pauseparam(struct net_device *dev, void __user *useraddr)
{
	struct ethtool_pauseparam pauseparam;

	if (!dev->ethtool_ops->get_pauseparam)
	if (!dev->ethtool_ops->set_pauseparam)
		return -EOPNOTSUPP;

	if (copy_from_user(&pauseparam, useraddr, sizeof(pauseparam)))