patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] common/cnxk: fix missing null check for inline device
@ 2022-03-28 10:41 Volodymyr Fialko
  2022-05-02 16:59 ` Jerin Jacob
  0 siblings, 1 reply; 2+ messages in thread
From: Volodymyr Fialko @ 2022-03-28 10:41 UTC (permalink / raw)
  To: dev, Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao
  Cc: jerinj, Volodymyr Fialko, stable

Inline device could be null in cases when it was not bound or missing.
Added check to prevent null pointer access.

Fixes: fe5846bcc07 ("net/cnxk: add devargs for min-max SPI")

Cc: stable@dpdk.org

Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
---
 drivers/common/cnxk/roc_nix_inl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/common/cnxk/roc_nix_inl.c b/drivers/common/cnxk/roc_nix_inl.c
index 877a9f1aa8..d0a38d2d4d 100644
--- a/drivers/common/cnxk/roc_nix_inl.c
+++ b/drivers/common/cnxk/roc_nix_inl.c
@@ -158,6 +158,8 @@ roc_nix_inl_inb_spi_range(struct roc_nix *roc_nix, bool inb_inl_dev,
 
 	inl_dev = idev->nix_inl_dev;
 	if (inb_inl_dev) {
+		if (inl_dev == NULL)
+			goto exit;
 		min = inl_dev->ipsec_in_min_spi;
 		max = inl_dev->ipsec_in_max_spi;
 		mask = inl_dev->inb_spi_mask;
-- 
2.25.1


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

end of thread, other threads:[~2022-05-02 16:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-28 10:41 [PATCH] common/cnxk: fix missing null check for inline device Volodymyr Fialko
2022-05-02 16:59 ` Jerin Jacob

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).