]> www.infradead.org Git - users/jedix/linux-maple.git/commit
PCI/IOV: Enlarge virtfn sysfs name buffer
authorAlexey V. Vissarionov <gremlin@altlinux.org>
Sun, 18 Dec 2022 03:33:47 +0000 (06:33 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:33:31 +0000 (09:33 +0100)
commit41e9ad787faba60c3aa070222474336b7c3d9f56
treef744fe46c83ca0a8b21c9b5985f10c05db87b4df
parentc13e1a90fbf572e6c0643edd413bdb8fd3b0b267
PCI/IOV: Enlarge virtfn sysfs name buffer

[ Upstream commit ea0b5aa5f184cf8293c93163f0fb00505190d431 ]

The sysfs link name "virtfn%u" constructed by pci_iov_sysfs_link() requires
17 bytes to contain the longest possible string.  Increase VIRTFN_ID_LEN to
accommodate that.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

[bhelgaas: commit log, comment at #define]
Fixes: dd7cc44d0bce ("PCI: add SR-IOV API for Physical Function driver")
Link: https://lore.kernel.org/r/20221218033347.23743-1-gremlin@altlinux.org
Signed-off-by: Alexey V. Vissarionov <gremlin@altlinux.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pci/iov.c