Thread (231 messages) 231 messages, 9 authors, 2016-11-11
STALE3521d

[PATCH v2 11/14] ether: verify we copy info from a PCI device

From: Shreyansh Jain <hidden>
Date: 2016-08-31 11:01:59
Subsystem: library code, the rest · Maintainers: Andrew Morton, Linus Torvalds

Now that different types of ethdev exist, check for presence of PCI dev
while copying out the info.
Similar would be done for SoC.

Signed-off-by: Jan Viktorin <redacted>
Signed-off-by: Shreyansh Jain <redacted>
Signed-off-by: Hemant Agrawal <redacted>
---
 lib/librte_ether/rte_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index b10d985..e9f5467 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -3200,6 +3200,8 @@ rte_eth_copy_pci_info(struct rte_eth_dev *eth_dev, struct rte_pci_device *pci_de
 		return;
 	}
 
+	RTE_VERIFY(eth_dev->pci_dev != NULL);
+
 	eth_dev->data->dev_flags = 0;
 	if (pci_dev->driver->drv_flags & RTE_PCI_DRV_INTR_LSC)
 		eth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_LSC;
-- 
2.7.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help