diff options
-rw-r--r-- | drivers/net/ethernet/amd/nmclan_cs.c | 7 | ||||
-rw-r--r-- | drivers/net/ethernet/fujitsu/fmvj18x_cs.c | 7 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/ethtool.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/smsc/smc91c92_cs.c | 4 | ||||
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 5 | ||||
-rw-r--r-- | drivers/net/tun.c | 10 | ||||
-rw-r--r-- | drivers/net/veth.c | 6 |
7 files changed, 22 insertions, 19 deletions
diff --git a/drivers/net/ethernet/amd/nmclan_cs.c b/drivers/net/ethernet/amd/nmclan_cs.c index 3accd5d21b0..3d7be5aa49e 100644 --- a/drivers/net/ethernet/amd/nmclan_cs.c +++ b/drivers/net/ethernet/amd/nmclan_cs.c | |||
@@ -822,9 +822,10 @@ static int mace_close(struct net_device *dev) | |||
822 | static void netdev_get_drvinfo(struct net_device *dev, | 822 | static void netdev_get_drvinfo(struct net_device *dev, |
823 | struct ethtool_drvinfo *info) | 823 | struct ethtool_drvinfo *info) |
824 | { | 824 | { |
825 | strcpy(info->driver, DRV_NAME); | 825 | strlcpy(info->driver, DRV_NAME, sizeof(info->driver)); |
826 | strcpy(info->version, DRV_VERSION); | 826 | strlcpy(info->version, DRV_VERSION, sizeof(info->version)); |
827 | sprintf(info->bus_info, "PCMCIA 0x%lx", dev->base_addr); | 827 | snprintf(info->bus_info, sizeof(info->bus_info), |
828 | "PCMCIA 0x%lx", dev->base_addr); | ||
828 | } | 829 | } |
829 | 830 | ||
830 | static const struct ethtool_ops netdev_ethtool_ops = { | 831 | static const struct ethtool_ops netdev_ethtool_ops = { |
diff --git a/drivers/net/ethernet/fujitsu/fmvj18x_cs.c b/drivers/net/ethernet/fujitsu/fmvj18x_cs.c index 15416752c13..ee84b472cee 100644 --- a/drivers/net/ethernet/fujitsu/fmvj18x_cs.c +++ b/drivers/net/ethernet/fujitsu/fmvj18x_cs.c | |||
@@ -1058,9 +1058,10 @@ static void fjn_rx(struct net_device *dev) | |||
1058 | static void netdev_get_drvinfo(struct net_device *dev, | 1058 | static void netdev_get_drvinfo(struct net_device *dev, |
1059 | struct ethtool_drvinfo *info) | 1059 | struct ethtool_drvinfo *info) |
1060 | { | 1060 | { |
1061 | strcpy(info->driver, DRV_NAME); | 1061 | strlcpy(info->driver, DRV_NAME, sizeof(info->driver)); |
1062 | strcpy(info->version, DRV_VERSION); | 1062 | strlcpy(info->version, DRV_VERSION, sizeof(info->version)); |
1063 | sprintf(info->bus_info, "PCMCIA 0x%lx", dev->base_addr); | 1063 | snprintf(info->bus_info, sizeof(info->bus_info), |
1064 | "PCMCIA 0x%lx", dev->base_addr); | ||
1064 | } | 1065 | } |
1065 | 1066 | ||
1066 | static const struct ethtool_ops netdev_ethtool_ops = { | 1067 | static const struct ethtool_ops netdev_ethtool_ops = { |
diff --git a/drivers/net/ethernet/intel/e1000e/ethtool.c b/drivers/net/ethernet/intel/e1000e/ethtool.c index 6d8f0ed3321..fb2c28e799a 100644 --- a/drivers/net/ethernet/intel/e1000e/ethtool.c +++ b/drivers/net/ethernet/intel/e1000e/ethtool.c | |||
@@ -582,7 +582,7 @@ static void e1000_get_drvinfo(struct net_device *netdev, | |||
582 | 582 | ||
583 | strlcpy(drvinfo->driver, e1000e_driver_name, | 583 | strlcpy(drvinfo->driver, e1000e_driver_name, |
584 | sizeof(drvinfo->driver)); | 584 | sizeof(drvinfo->driver)); |
585 | strncpy(drvinfo->version, e1000e_driver_version, | 585 | strlcpy(drvinfo->version, e1000e_driver_version, |
586 | sizeof(drvinfo->version)); | 586 | sizeof(drvinfo->version)); |
587 | 587 | ||
588 | /* | 588 | /* |
diff --git a/drivers/net/ethernet/smsc/smc91c92_cs.c b/drivers/net/ethernet/smsc/smc91c92_cs.c index cbfa9818713..ada927aba7a 100644 --- a/drivers/net/ethernet/smsc/smc91c92_cs.c +++ b/drivers/net/ethernet/smsc/smc91c92_cs.c | |||
@@ -1909,8 +1909,8 @@ static int check_if_running(struct net_device *dev) | |||
1909 | 1909 | ||
1910 | static void smc_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) | 1910 | static void smc_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) |
1911 | { | 1911 | { |
1912 | strcpy(info->driver, DRV_NAME); | 1912 | strlcpy(info->driver, DRV_NAME, sizeof(info->driver)); |
1913 | strcpy(info->version, DRV_VERSION); | 1913 | strlcpy(info->version, DRV_VERSION, sizeof(info->version)); |
1914 | } | 1914 | } |
1915 | 1915 | ||
1916 | static int smc_get_settings(struct net_device *dev, struct ethtool_cmd *ecmd) | 1916 | static int smc_get_settings(struct net_device *dev, struct ethtool_cmd *ecmd) |
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c index e8eff09bbbd..c18ca596a49 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | |||
@@ -185,9 +185,10 @@ static void stmmac_ethtool_getdrvinfo(struct net_device *dev, | |||
185 | struct stmmac_priv *priv = netdev_priv(dev); | 185 | struct stmmac_priv *priv = netdev_priv(dev); |
186 | 186 | ||
187 | if (priv->plat->has_gmac) | 187 | if (priv->plat->has_gmac) |
188 | strcpy(info->driver, GMAC_ETHTOOL_NAME); | 188 | strlcpy(info->driver, GMAC_ETHTOOL_NAME, sizeof(info->driver)); |
189 | else | 189 | else |
190 | strcpy(info->driver, MAC100_ETHTOOL_NAME); | 190 | strlcpy(info->driver, MAC100_ETHTOOL_NAME, |
191 | sizeof(info->driver)); | ||
191 | 192 | ||
192 | strcpy(info->version, DRV_MODULE_VERSION); | 193 | strcpy(info->version, DRV_MODULE_VERSION); |
193 | info->fw_version[0] = '\0'; | 194 | info->fw_version[0] = '\0'; |
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 7bea9c65119..8592523b0bb 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c | |||
@@ -1589,16 +1589,16 @@ static void tun_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info | |||
1589 | { | 1589 | { |
1590 | struct tun_struct *tun = netdev_priv(dev); | 1590 | struct tun_struct *tun = netdev_priv(dev); |
1591 | 1591 | ||
1592 | strcpy(info->driver, DRV_NAME); | 1592 | strlcpy(info->driver, DRV_NAME, sizeof(info->driver)); |
1593 | strcpy(info->version, DRV_VERSION); | 1593 | strlcpy(info->version, DRV_VERSION, sizeof(info->version)); |
1594 | strcpy(info->fw_version, "N/A"); | 1594 | strlcpy(info->fw_version, "N/A", sizeof(info->fw_version)); |
1595 | 1595 | ||
1596 | switch (tun->flags & TUN_TYPE_MASK) { | 1596 | switch (tun->flags & TUN_TYPE_MASK) { |
1597 | case TUN_TUN_DEV: | 1597 | case TUN_TUN_DEV: |
1598 | strcpy(info->bus_info, "tun"); | 1598 | strlcpy(info->bus_info, "tun", sizeof(info->bus_info)); |
1599 | break; | 1599 | break; |
1600 | case TUN_TAP_DEV: | 1600 | case TUN_TAP_DEV: |
1601 | strcpy(info->bus_info, "tap"); | 1601 | strlcpy(info->bus_info, "tap", sizeof(info->bus_info)); |
1602 | break; | 1602 | break; |
1603 | } | 1603 | } |
1604 | } | 1604 | } |
diff --git a/drivers/net/veth.c b/drivers/net/veth.c index 726c790ec74..d32a75fb6d2 100644 --- a/drivers/net/veth.c +++ b/drivers/net/veth.c | |||
@@ -66,9 +66,9 @@ static int veth_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) | |||
66 | 66 | ||
67 | static void veth_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) | 67 | static void veth_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) |
68 | { | 68 | { |
69 | strcpy(info->driver, DRV_NAME); | 69 | strlcpy(info->driver, DRV_NAME, sizeof(info->driver)); |
70 | strcpy(info->version, DRV_VERSION); | 70 | strlcpy(info->version, DRV_VERSION, sizeof(info->version)); |
71 | strcpy(info->fw_version, "N/A"); | 71 | strlcpy(info->fw_version, "N/A", sizeof(info->fw_version)); |
72 | } | 72 | } |
73 | 73 | ||
74 | static void veth_get_strings(struct net_device *dev, u32 stringset, u8 *buf) | 74 | static void veth_get_strings(struct net_device *dev, u32 stringset, u8 *buf) |