From 32c00ce79a9618ae1123fdd1a83084a90cc9ae97 Mon Sep 17 00:00:00 2001 From: Damjan Marion Date: Wed, 29 Nov 2023 12:32:54 +0000 Subject: pci: fix MSI-X vector length check Type: fix Fixes: 38c6191 Change-Id: I7760947986dc56236f2494fb1c8c238321489ef6 Signed-off-by: Damjan Marion --- src/vnet/dev/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/vnet/dev/pci.c b/src/vnet/dev/pci.c index d35c5f9824f..3cc0cba5003 100644 --- a/src/vnet/dev/pci.c +++ b/src/vnet/dev/pci.c @@ -284,7 +284,7 @@ vnet_dev_pci_msix_handler (vlib_main_t *vm, vlib_pci_dev_handle_t h, u16 line) vnet_dev_t *dev = (vnet_dev_t *) vlib_pci_get_private_data (vm, h); vnet_dev_bus_pci_device_data_t *pdd = vnet_dev_get_bus_pci_device_data (dev); - if (line < vec_len (pdd->msix_handlers) && pdd->msix_handlers[line]) + if (line < pdd->n_msix_int && pdd->msix_handlers[line]) pdd->msix_handlers[line](vm, dev, line); } -- cgit 1.2.3-korg