DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] crypto/qat: fix access to null pointer
@ 2021-11-03 15:08 Przemyslaw Zegan
  2021-11-03 18:03 ` Kusztal, ArkadiuszX
  2021-11-04 11:47 ` [dpdk-dev] [EXT] " Akhil Goyal
  0 siblings, 2 replies; 3+ messages in thread
From: Przemyslaw Zegan @ 2021-11-03 15:08 UTC (permalink / raw)
  To: dev; +Cc: gakhil, roy.fan.zhang, Przemyslaw Zegan

This patch fixes a possible access to null pointer

Fixes: 9f4b9222019c ("common/qat: add gen specific queue implementation")
Cc: roy.fan.zhang@intel.com

Signed-off-by: Przemyslaw Zegan <przemyslawx.zegan@intel.com>
---
 drivers/common/qat/dev/qat_dev_gen1.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/common/qat/dev/qat_dev_gen1.c b/drivers/common/qat/dev/qat_dev_gen1.c
index ed4c4a2c03..f15238cc23 100644
--- a/drivers/common/qat/dev/qat_dev_gen1.c
+++ b/drivers/common/qat/dev/qat_dev_gen1.c
@@ -92,6 +92,9 @@ qat_qp_rings_per_service_gen1(struct qat_pci_device *qat_dev,
 	for (i = 0; i < ADF_MAX_QPS_ON_ANY_SERVICE; i++) {
 		const struct qat_qp_hw_data *hw_qps =
 				qat_qp_get_hw_data(qat_dev, service, i);
+
+		if(hw_qps == NULL)
+			continue;
 		if (hw_qps->service_type == service)
 			count++;
 	}
-- 
2.30.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-11-04 11:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-03 15:08 [dpdk-dev] [PATCH] crypto/qat: fix access to null pointer Przemyslaw Zegan
2021-11-03 18:03 ` Kusztal, ArkadiuszX
2021-11-04 11:47 ` [dpdk-dev] [EXT] " Akhil Goyal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).