mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 23:27:06 +00:00
PCI/IOV: Enlarge virtfn sysfs name buffer
[ Upstream commitea0b5aa5f1
] 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:dd7cc44d0b
("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>
This commit is contained in:
parent
226e6fbbf5
commit
c3c277b7fd
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue