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

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

On Mon, Mar 28, 2022 at 4:11 PM Volodymyr Fialko <vfialko@marvell.com> wrote:
>
> 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>


Acked-by: Jerin Jacob <jerinj@marvell.com>
Applied to dpdk-next-net-mrvl/for-next-net. Thanks


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

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ http://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git