diff options
| author | Moyster <oysterized@gmail.com> | 2017-03-20 16:39:36 +0100 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-04-11 11:00:26 +0200 |
| commit | b40cd069a444e9b23c16852012e3966ecaa99f17 (patch) | |
| tree | b58bf0d47f781dd78e79b35d9a85a1266f2eca6d /net/core | |
| parent | ffabe4b59ef414b92894cf5b40e4e1e59eaac011 (diff) | |
mtk: squashed security updates
Diffstat (limited to 'net/core')
| -rw-r--r-- | net/core/ethtool.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/core/ethtool.c b/net/core/ethtool.c index 213b61255..4ab21a688 100644 --- a/net/core/ethtool.c +++ b/net/core/ethtool.c @@ -711,11 +711,13 @@ static int ethtool_reset(struct net_device *dev, char __user *useraddr) static int ethtool_get_wol(struct net_device *dev, char __user *useraddr) { - struct ethtool_wolinfo wol = { .cmd = ETHTOOL_GWOL }; + struct ethtool_wolinfo wol; if (!dev->ethtool_ops->get_wol) return -EOPNOTSUPP; + memset(&wol, 0, sizeof(struct ethtool_wolinfo)); + wol.cmd = ETHTOOL_GWOL; dev->ethtool_ops->get_wol(dev, &wol); if (copy_to_user(useraddr, &wol, sizeof(wol))) |
