DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: Thierry Herbelot <thierry.herbelot@6wind.com>
Cc: dpdk-dev <dev@dpdk.org>, Thomas Monjalon <thomas@monjalon.net>,
	dpdk stable <stable@dpdk.org>,
	Somnath Kotur <somnath.kotur@broadcom.com>
Subject: Re: [dpdk-dev] [PATCH] net/bnxt: do not use possibly NULL pointers
Date: Mon, 7 Jun 2021 14:17:36 -0700	[thread overview]
Message-ID: <CACZ4nhuvky+iv+xh9MNhRdJ_vWs6x8jRKSV8s5qE-E1PH+VAgQ@mail.gmail.com> (raw)
In-Reply-To: <20210524090038.16580-1-thierry.herbelot@6wind.com>

[-- Attachment #1: Type: text/plain, Size: 1310 bytes --]

On Mon, May 24, 2021 at 2:00 AM Thierry Herbelot
<thierry.herbelot@6wind.com> wrote:
>
> Check that pointers are valid before using them.
>
> Fixes: 7bc8e9a227ccb ("net/bnxt: support async link notification")
> Cc: stable@dpdk.org
> Cc: Ajit Khaparde <ajit.khaparde@broadcom.com>
> Cc: Somnath Kotur <somnath.kotur@broadcom.com>
>
> Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>

Modified the commit headline and applied to
dpdk-next-net-brcm/for-next-net branch.

Thanks

> ---
>  drivers/net/bnxt/bnxt_irq.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/bnxt/bnxt_irq.c b/drivers/net/bnxt/bnxt_irq.c
> index 8abbadb3d19d..fd8b8fac989a 100644
> --- a/drivers/net/bnxt/bnxt_irq.c
> +++ b/drivers/net/bnxt/bnxt_irq.c
> @@ -21,11 +21,14 @@ void bnxt_int_handler(void *param)
>  {
>         struct rte_eth_dev *eth_dev = (struct rte_eth_dev *)param;
>         struct bnxt *bp = eth_dev->data->dev_private;
> -       struct bnxt_cp_ring_info *cpr = bp->async_cp_ring;
> +       struct bnxt_cp_ring_info *cpr;
>         struct cmpl_base *cmp;
>         uint32_t raw_cons;
>         uint32_t cons;
>
> +       if (bp == NULL)
> +               return;
> +       cpr = bp->async_cp_ring;
>         if (cpr == NULL)
>                 return;
>
> --
> 2.29.2
>

      reply	other threads:[~2021-06-07 21:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-24  9:00 Thierry Herbelot
2021-06-07 21:17 ` Ajit Khaparde [this message]

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=CACZ4nhuvky+iv+xh9MNhRdJ_vWs6x8jRKSV8s5qE-E1PH+VAgQ@mail.gmail.com \
    --to=ajit.khaparde@broadcom.com \
    --cc=dev@dpdk.org \
    --cc=somnath.kotur@broadcom.com \
    --cc=stable@dpdk.org \
    --cc=thierry.herbelot@6wind.com \
    --cc=thomas@monjalon.net \
    /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).