X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=net%2Fcore%2Fethtool.c;h=f31698ab0ef0d6e6cc25ada91fc9c24eb6f26cce;hp=f444817071245006200ba882a2f085ee43ae3773;hb=68c3e59aa9cdf2d8870d8fbe4f37b1a509d0abeb;hpb=91e67a996c60a347ad7b918a74efb0f6b3b274c3 diff --git a/net/core/ethtool.c b/net/core/ethtool.c index f44481707124..f31698ab0ef0 100644 --- a/net/core/ethtool.c +++ b/net/core/ethtool.c @@ -1359,7 +1359,7 @@ static int ethtool_get_strings(struct net_device *dev, void __user *useraddr) gstrings.len = ret; - data = kmalloc(gstrings.len * ETH_GSTRING_LEN, GFP_USER); + data = kcalloc(gstrings.len, ETH_GSTRING_LEN, GFP_USER); if (!data) return -ENOMEM; @@ -1549,6 +1549,8 @@ static noinline_for_stack int ethtool_flash_device(struct net_device *dev, if (!dev->ethtool_ops->flash_device) return -EOPNOTSUPP; + efl.data[ETHTOOL_FLASH_MAX_FILENAME - 1] = 0; + return dev->ethtool_ops->flash_device(dev, &efl); } @@ -1670,6 +1672,7 @@ int dev_ethtool(struct net *net, struct ifreq *ifr) case ETHTOOL_GRXCSUM: case ETHTOOL_GTXCSUM: case ETHTOOL_GSG: + case ETHTOOL_GSSET_INFO: case ETHTOOL_GSTRINGS: case ETHTOOL_GTSO: case ETHTOOL_GPERMADDR: