DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] common/dpaax: fix possible null pointer access
@ 2021-04-21  2:46 Min Hu (Connor)
  2021-04-21 12:12 ` Hemant Agrawal
  0 siblings, 1 reply; 3+ messages in thread
From: Min Hu (Connor) @ 2021-04-21  2:46 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, hemant.agrawal, sachin.saxena

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++) {
-- 
2.7.4


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

* Re: [dpdk-dev] [PATCH] common/dpaax: fix possible null pointer access
  2021-04-21  2:46 [dpdk-dev] [PATCH] common/dpaax: fix possible null pointer access Min Hu (Connor)
@ 2021-04-21 12:12 ` Hemant Agrawal
  2021-04-21 15:03   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Hemant Agrawal @ 2021-04-21 12:12 UTC (permalink / raw)
  To: Min Hu (Connor), dev; +Cc: ferruh.yigit, hemant.agrawal, sachin.saxena


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>

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

* Re: [dpdk-dev] [PATCH] common/dpaax: fix possible null pointer access
  2021-04-21 12:12 ` Hemant Agrawal
@ 2021-04-21 15:03   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2021-04-21 15:03 UTC (permalink / raw)
  To: Min Hu (Connor)
  Cc: dev, ferruh.yigit, hemant.agrawal, sachin.saxena, hemant.agrawal

21/04/2021 14:12, Hemant Agrawal:
> 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>
> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>

Applied, thanks



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

end of thread, other threads:[~2021-04-21 15:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-21  2:46 [dpdk-dev] [PATCH] common/dpaax: fix possible null pointer access Min Hu (Connor)
2021-04-21 12:12 ` Hemant Agrawal
2021-04-21 15:03   ` Thomas Monjalon

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