common/dpaax: fix physical address conversion
authorGagandeep Singh <g.singh@nxp.com>
Wed, 6 Oct 2021 17:01:31 +0000 (22:31 +0530)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 7 Oct 2021 12:47:35 +0000 (14:47 +0200)
commitc5e6bc12a319d4500d931ca84d4227e4d7495956
treebcb55cd529887b5921e0cb024b855e73cf2aac0e
parent73281ef816e9b00524325acd0cb9fc394ef08579
common/dpaax: fix physical address conversion

If some of the VA entries of table are somehow not populated and are
NULL, it can add offset to NULL and return the invalid VA in PA to
VA conversion.

In this patch, adding a check if the VA entry has valid address only
then add offset and return VA.

Fixes: 2f3d633aa593 ("common/dpaax: add library for PA/VA translation table")
Cc: stable@dpdk.org
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
drivers/common/dpaax/dpaax_iova_table.h