1
0
Fork 0
alistair23-linux/drivers/net/ethernet/intel
Jacob Keller 696ac80aa1 i40evf: fix possible snprintf truncation of q_vector->name
The q_vector names are based on the interface name with a driver prefix,
the type of q_vector setup, and the queue number. We previously set the
size of this variable to IFNAMSIZ + 9, which is incorrect, because we
actually include a minimum of 14 characters extra beyond the interface
name size.

New versions of GCC since 7 include a new warning that detects this
possible truncation and complains. We can fix this by increasing the
size in case our interface name is too large to avoid truncation. We
don't need to go beyond 14 because the compiler is smart enough to
realize our values can never exceed size of 1. We do go up to 15 here
because possible future changes may increase the number of queues beyond
one digit.

While we are here, also change some variables to be unsigned (since they
are never negative) and stop using an extra unnecessary %s format
specifier.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2017-08-27 15:43:58 -07:00
..
e1000 networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
e1000e e1000e: Initial Support for IceLake 2017-08-08 17:54:21 -07:00
fm10k net: sched: get rid of struct tc_to_netdev 2017-08-07 09:42:37 -07:00
i40e i40e: Use correct flag to enable egress traffic for unicast promisc 2017-08-27 15:43:53 -07:00
i40evf i40evf: fix possible snprintf truncation of q_vector->name 2017-08-27 15:43:58 -07:00
igb igb: support BCM54616 PHY 2017-08-08 18:09:12 -07:00
igbvf igbvf: convert msleep to mdelay in atomic context 2017-08-08 18:08:00 -07:00
ixgb ixgb: Omit private ndo_get_stats function 2017-04-20 16:18:45 -07:00
ixgbe ixgbe: use return codes from ndo_xdp_xmit that are distinguishable 2017-08-24 11:59:37 -07:00
ixgbevf ixgbe: Initialize 64-bit stats seqcounts 2017-08-01 20:06:07 -07:00
Kconfig i40evf: Add support for Adaptive Virtual Function 2017-06-01 14:30:02 -07:00
Makefile fm10k: Add skeletal frame for Intel(R) FM10000 Ethernet Switch Host Interface Driver 2014-09-23 03:59:13 -07:00
e100.c net/{mii, smsc}: Make mii_ethtool_get_link_ksettings and smc_netdev_get_ecmd return void 2017-06-05 11:00:42 -04:00