bianbu-linux-6.6/drivers/net/ethernet
Gerhard Engleder 6bb50965e3 tsnep: Fix tsnep_request_irq() format-overflow warning
[ Upstream commit 00e984cb986b31e9313745e51daceaa1e1eb7351 ]

Compiler warns about a possible format-overflow in tsnep_request_irq():
drivers/net/ethernet/engleder/tsnep_main.c:884:55: warning: 'sprintf' may write a terminating nul past the end of the destination [-Wformat-overflow=]
                         sprintf(queue->name, "%s-rx-%d", name,
                                                       ^
drivers/net/ethernet/engleder/tsnep_main.c:881:55: warning: 'sprintf' may write a terminating nul past the end of the destination [-Wformat-overflow=]
                         sprintf(queue->name, "%s-tx-%d", name,
                                                       ^
drivers/net/ethernet/engleder/tsnep_main.c:878:49: warning: '-txrx-' directive writing 6 bytes into a region of size between 5 and 25 [-Wformat-overflow=]
                         sprintf(queue->name, "%s-txrx-%d", name,
                                                 ^~~~~~

Actually overflow cannot happen. Name is limited to IFNAMSIZ, because
netdev_name() is called during ndo_open(). queue_index is single char,
because less than 10 queues are supported.

Fix warning with snprintf(). Additionally increase buffer to 32 bytes,
because those 7 additional bytes were unused anyway.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202310182028.vmDthIUa-lkp@intel.com/
Signed-off-by: Gerhard Engleder <gerhard@engleder-embedded.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://lore.kernel.org/r/20231023183856.58373-1-gerhard@engleder-embedded.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-28 17:19:38 +00:00
..
3com
8390 net: ethernet: 8390: ne2k-pci: use module_pci_driver() macro 2023-08-10 19:31:57 -07:00
actions
adaptec
adi net: ethernet: adi: adin1110: Fix uninitialized variable 2023-10-21 11:54:42 +01:00
aeroflex net: Explicitly include correct DT includes 2023-07-27 20:33:16 -07:00
agere et131x: Use pci_dev_id() to simplify the code 2023-08-13 12:30:39 +01:00
alacritech net: ethernet: slicoss: remove redundant increment of pointer data 2023-07-28 15:37:08 -07:00
allwinner
alteon
altera net: altera-tse: make ALTERA_TSE depend on HAS_IOMEM 2023-08-18 10:18:51 -07:00
amazon net: ena: Flush XDP packets on error. 2023-09-21 09:01:41 +02:00
amd VFIO updates for v6.6-rc1 2023-08-30 20:36:01 -07:00
apm net: xgene: Fix unused xgene_enet_of_match warning for !CONFIG_OF 2023-10-21 11:49:31 +01:00
apple net/macmace: Replace zero-length array with DECLARE_FLEX_ARRAY() helper 2023-08-01 14:46:21 -07:00
aquantia net: atlantic: Remove unnecessary (void*) conversions 2023-07-18 19:00:47 -07:00
arc net: Explicitly include correct DT includes 2023-07-27 20:33:16 -07:00
asix
atheros atl1c: Work around the DMA RX overflow issue 2023-11-28 17:19:37 +00:00
broadcom tg3: power down device only on SYSTEM_POWER_OFF 2023-11-20 11:59:36 +01:00
brocade Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-07-20 15:52:55 -07:00
cadence net: macb: fix sleep inside spinlock 2023-09-12 14:58:44 +02:00
calxeda
cavium Networking changes for 6.5. 2023-06-28 16:43:10 -07:00
chelsio chtls: fix tp->rcv_tstamp initialization 2023-11-20 11:59:01 +01:00
cirrus cirrus: cs89x0: fix the return value handle and remove redundant dev_warn() for platform_get_irq() 2023-08-02 12:10:39 -07:00
cisco
cortina net: gemini: Remove redundant of_match_ptr() 2023-08-16 09:59:40 +01:00
davicom net: dm9051: Use PTR_ERR_OR_ZERO() to simplify code 2023-08-23 18:57:30 -07:00
dec
dlink
emulex rtnetlink: remove redundant checks for nlattr IFLA_BRIDGE_MODE 2023-08-08 15:10:37 -07:00
engleder tsnep: Fix tsnep_request_irq() format-overflow warning 2023-11-28 17:19:38 +00:00
ezchip net: Explicitly include correct DT includes 2023-07-27 20:33:16 -07:00
faraday net: ftmac100: add multicast filtering possibility 2023-08-11 06:58:31 +01:00
freescale net: enetc: shorten enetc_setup_xdp_prog() error message to fit NETLINK_MAX_FMTMSG_LEN 2023-11-20 11:59:36 +01:00
fujitsu
fungible eth: add missing xdp.h includes in drivers 2023-08-03 08:38:07 -07:00
google gve: Use size_add() in call to struct_size() 2023-11-20 11:58:56 +01:00
hisilicon net: hns3: add 5ms delay before clear firmware reset irq source 2023-09-19 12:13:08 +02:00
huawei net: hinic: Fix warning-hinic_set_vlan_fliter() warn: variable dereferenced before check 'hwdev' 2023-09-20 10:54:45 +01:00
i825xx
ibm ibmveth: Remove condition to recompute TCP header checksum. 2023-10-04 11:19:57 +01:00
intel ice: Fix VF-VF direction matching in drop rule in switchdev 2023-11-20 11:59:36 +01:00
litex net: ethernet: litex: add support for 64 bit stats 2023-06-15 22:56:46 -07:00
marvell octeontx2-pf: Free pending and dropped SQEs 2023-11-20 11:59:35 +01:00
mediatek net: ethernet: mtk_wed: fix EXT_INT_STATUS_RX_FBUF definitions for MT7986 SoC 2023-11-20 11:58:57 +01:00
mellanox mlxsw: Use size_mul() in call to struct_size() 2023-11-20 11:58:56 +01:00
micrel
microchip net: lan743x: also select PHYLIB 2023-10-05 09:10:18 -07:00
microsoft net: mana: Fix oversized sge0 for GSO packets 2023-10-05 11:45:06 +02:00
moxa
mscc net: mscc: ocelot: Remove unused declarations 2023-08-22 10:29:15 -07:00
myricom
natsemi
neterion ethernet: s2io: Use ether_addr_to_u64() to convert ethernet address 2023-08-09 15:26:49 -07:00
netronome nfp: flower: avoid rmmod nfp crash issues 2023-10-11 10:34:38 +01:00
ni net: Explicitly include correct DT includes 2023-07-27 20:33:16 -07:00
nvidia
nxp
oki-semi
packetengines
pasemi
pensando ionic: fix 16bit math issue when PAGE_SIZE >= 64KB 2023-09-16 11:42:11 +01:00
qlogic qed: fix LL2 RX buffer allocation 2023-10-15 14:29:14 +01:00
qualcomm net: qualcomm: Remove redundant of_match_ptr() 2023-08-16 09:59:40 +01:00
rdc
realtek r8169: respect userspace disabling IFF_MULTICAST 2023-11-20 11:59:36 +01:00
renesas rswitch: Fix imbalance phy_power_off() calling 2023-10-12 11:22:21 +02:00
rocker
samsung
seeq
sfc sfc: cleanup and reduce netlink error messages 2023-10-23 15:47:47 -07:00
sgi
silan
sis
smsc net: smsc: Use pci_dev_id() to simplify the code 2023-08-13 12:30:39 +01:00
socionext page_pool: split types and declarations from page_pool.h 2023-08-07 13:05:19 -07:00
stmicro net: stmmac: xgmac: Enable support for multiple Flexible PPS outputs 2023-11-20 11:59:35 +01:00
sun ethernet: ldmvsw: mark ldmvsw_open() static 2023-08-11 18:24:02 -07:00
sunplus
synopsys
tehuti
ti net: ti: icss-iep: fix setting counter value 2023-11-20 11:59:37 +01:00
toshiba net: spider_net: Use size_add() in call to struct_size() 2023-11-20 11:58:57 +01:00
tundra
vertexcom
via net: Explicitly include correct DT includes 2023-07-27 20:33:16 -07:00
wangxun net: ngbe: move mdio access registers to libwx 2023-08-25 07:42:59 +01:00
wiznet
xilinx Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-08-03 14:34:37 -07:00
xircom
xscale
dnet.c
dnet.h
ec_bhf.c
ethoc.c
fealnx.c
jme.c
jme.h
Kconfig
korina.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-08-03 14:34:37 -07:00
lantiq_etop.c
lantiq_xrx200.c
Makefile