DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerinjacobk@gmail.com>
To: Rahul Bhansali <rbhansali@marvell.com>
Cc: dev@dpdk.org, Nithin Dabilpuram <ndabilpuram@marvell.com>,
	 Kiran Kumar K <kirankumark@marvell.com>,
	Sunil Kumar Kori <skori@marvell.com>,
	 Satha Rao <skoteshwar@marvell.com>,
	Harman Kalra <hkalra@marvell.com>,
	 Vidya Sagar Velumuri <vvelumuri@marvell.com>,
	Jerin Jacob <jerinj@marvell.com>
Subject: Re: [PATCH v2 2/2] common/cnxk: fix null pointer checks
Date: Thu, 26 Jun 2025 11:01:42 +0530	[thread overview]
Message-ID: <CALBAE1OMRj9s7ONbqvRrN8p5V9-5-yzv9JA4HTbBZzWuOCJ8aQ@mail.gmail.com> (raw)
In-Reply-To: <20250623044907.2906896-2-rbhansali@marvell.com>

On Mon, Jun 23, 2025 at 10:19 AM Rahul Bhansali <rbhansali@marvell.com> wrote:
>
> Adds null pointer check before executing CPT instruction.
>
> Fixes: 4d00b8c6a331 ("common/cnxk: allocate dynamic BPIDs")
> Fixes: 4af4e36a93d7 ("common/cnxk: support inline device API without ROC NIX")
>
> Signed-off-by: Rahul Bhansali <rbhansali@marvell.com>

Series applied to dpdk-next-net-mrvl/for-main. Thanks.


> ---
> Changes in v2: Updated fixes in commit message.
>
>  drivers/common/cnxk/roc_nix_inl.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/common/cnxk/roc_nix_inl.c b/drivers/common/cnxk/roc_nix_inl.c
> index bee8e25c7c..c7637ddbdc 100644
> --- a/drivers/common/cnxk/roc_nix_inl.c
> +++ b/drivers/common/cnxk/roc_nix_inl.c
> @@ -1312,7 +1312,7 @@ static int
>  nix_inl_legacy_inb_init(struct roc_nix *roc_nix)
>  {
>         struct nix *nix = roc_nix_to_nix_priv(roc_nix);
> -       struct roc_cpt_inline_ipsec_inb_cfg cfg;
> +       struct roc_cpt_inline_ipsec_inb_cfg cfg = {0};
>         struct idev_cfg *idev = idev_get_cfg();
>         uint16_t bpids[ROC_NIX_MAX_BPID_CNT];
>         struct roc_cpt *roc_cpt;
> @@ -2219,7 +2219,7 @@ roc_nix_inl_sa_sync(struct roc_nix *roc_nix, void *sa, bool inb,
>         if (idev)
>                 inl_dev = idev->nix_inl_dev;
>
> -       if (!inl_dev && roc_nix == NULL)
> +       if ((!inl_dev && roc_nix == NULL) || sa == NULL)
>                 return -EINVAL;
>
>         if (roc_nix) {
> @@ -2299,7 +2299,7 @@ roc_nix_inl_ctx_write(struct roc_nix *roc_nix, void *sa_dptr, void *sa_cptr,
>         if (idev)
>                 inl_dev = idev->nix_inl_dev;
>
> -       if (!inl_dev && roc_nix == NULL)
> +       if ((!inl_dev && roc_nix == NULL) || sa_dptr == NULL || sa_cptr == NULL)
>                 return -EINVAL;
>
>         if (roc_nix) {
> --
> 2.25.1
>

  parent reply	other threads:[~2025-06-26  5:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-20  5:09 [PATCH 1/2] net/cnxk: add lock for security session ops Rahul Bhansali
2025-06-20  5:09 ` [PATCH 2/2] common/cnxk: add null pointer checks Rahul Bhansali
2025-06-20 10:53   ` Jerin Jacob
2025-06-23  4:49 ` [PATCH v2 1/2] net/cnxk: fix lock for security session ops Rahul Bhansali
2025-06-23  4:49   ` [PATCH v2 2/2] common/cnxk: fix null pointer checks Rahul Bhansali
2025-06-23 12:50     ` zhoumin
2025-06-23 13:01       ` zhoumin
2025-06-23 13:15         ` zhoumin
2025-06-26  5:31     ` Jerin Jacob [this message]
2025-06-24  1:54   ` [PATCH v2 1/2] net/cnxk: fix lock for security session ops zhoumin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALBAE1OMRj9s7ONbqvRrN8p5V9-5-yzv9JA4HTbBZzWuOCJ8aQ@mail.gmail.com \
    --to=jerinjacobk@gmail.com \
    --cc=dev@dpdk.org \
    --cc=hkalra@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=kirankumark@marvell.com \
    --cc=ndabilpuram@marvell.com \
    --cc=rbhansali@marvell.com \
    --cc=skori@marvell.com \
    --cc=skoteshwar@marvell.com \
    --cc=vvelumuri@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).