[dpdk-dev] [PATCH] common/dpaax: fix possible null pointer access
Hemant Agrawal
hemant.agrawal at oss.nxp.com
Wed Apr 21 14:12:37 CEST 2021
On 4/21/2021 8:16 AM, Min Hu (Connor) wrote:
> From: Chengwen Feng <fengchengwen at 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 at dpdk.org
>
> Signed-off-by: Chengwen Feng <fengchengwen at huawei.com>
> Signed-off-by: Min Hu (Connor) <humin29 at 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 at nxp.com>
More information about the dev
mailing list