diff options
author | Alexey V. Vissarionov <gremlin@altlinux.org> | 2022-12-18 06:33:47 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-10 09:39:37 +0100 |
commit | 53b65fa40c01ad02c8b4640834344bae9ef9b61b (patch) | |
tree | 77f6b598c639db9c2ae14114690da73b046e652a /drivers/pci | |
parent | 645384e26f2082c609c8d9b7345a7fc63d20407d (diff) |
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>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/iov.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c index dafdc652fcd0..ef71c1a20400 100644 --- a/drivers/pci/iov.c +++ b/drivers/pci/iov.c @@ -14,7 +14,7 @@ #include <linux/delay.h> #include "pci.h" -#define VIRTFN_ID_LEN 16 +#define VIRTFN_ID_LEN 17 /* "virtfn%u\0" for 2^32 - 1 */ int pci_iov_virtfn_bus(struct pci_dev *dev, int vf_id) { |