DPDK patches and discussions
 help / color / mirror / Atom feed
From: Hemant Agrawal <hemant.agrawal@oss.nxp.com>
To: "Min Hu (Connor)" <humin29@huawei.com>, dev@dpdk.org
Cc: ferruh.yigit@intel.com, hemant.agrawal@nxp.com,
	sachin.saxena@oss.nxp.com
Subject: Re: [dpdk-dev] [PATCH] common/dpaax: fix possible null pointer access
Date: Wed, 21 Apr 2021 17:42:37 +0530	[thread overview]
Message-ID: <3bbcd4a3-13bc-7573-a33f-e6013bb77cf5@oss.nxp.com> (raw)
In-Reply-To: <1618973213-25718-1-git-send-email-humin29@huawei.com>


On 4/21/2021 8:16 AM, Min Hu (Connor) wrote:
> From: Chengwen Feng <fengchengwen@huawei.com>
>
> This patch fixes possible null pointer access when dump iova table.
>
> Fixes: 2f3d633aa593 ("common/dpaax: add library for PA/VA translation table")
> Cc: stable@dpdk.org
>
> Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
> Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
> ---
>   drivers/common/dpaax/dpaax_iova_table.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/common/dpaax/dpaax_iova_table.c b/drivers/common/dpaax/dpaax_iova_table.c
> index 91bee65..54f89e1 100644
> --- a/drivers/common/dpaax/dpaax_iova_table.c
> +++ b/drivers/common/dpaax/dpaax_iova_table.c
> @@ -366,8 +366,10 @@ dpaax_iova_table_dump(void)
>   	}
>   
>   	DPAAX_DEBUG(" === Start of PA->VA Translation Table ===");
> -	if (dpaax_iova_table_p == NULL)
> +	if (dpaax_iova_table_p == NULL) {
>   		DPAAX_DEBUG("\tNULL");
> +		return;
> +	}
>   
>   	entry = dpaax_iova_table_p->entries;
>   	for (i = 0; i < dpaax_iova_table_p->count; i++) {
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>

  reply	other threads:[~2021-04-21 12:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-21  2:46 Min Hu (Connor)
2021-04-21 12:12 ` Hemant Agrawal [this message]
2021-04-21 15:03   ` Thomas Monjalon

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=3bbcd4a3-13bc-7573-a33f-e6013bb77cf5@oss.nxp.com \
    --to=hemant.agrawal@oss.nxp.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=humin29@huawei.com \
    --cc=sachin.saxena@oss.nxp.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).