mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-14 08:13:56 +08:00
[NET] ethtool: fix oops by testing correct struct member
Noticed by Willy Tarreau. Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
parent
82d6897fef
commit
e1b90c416d
@ -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)))
|
||||
|
Loading…
Reference in New Issue
Block a user