Skip to content
Snippets Groups Projects
Commit 300f50ee authored by Liam Mark's avatar Liam Mark
Browse files

lrdp-v2: check for NULL pgtbl_ops

Ensure we don't try to parse the page tables for an arm_smmu_domain
where the pgtbl_ops is NULL.

CRs-Fixed: 1034128
Change-Id: If9e63e27a052ed45ad3c187983311acdc3376579
parent a6485a35
No related branches found
No related tags found
No related merge requests found
...@@ -96,6 +96,9 @@ class IommuLib(object): ...@@ -96,6 +96,9 @@ class IommuLib(object):
pgtbl_ops_ptr = self.ramdump.read_structure_field( pgtbl_ops_ptr = self.ramdump.read_structure_field(
arm_smmu_domain_ptr, 'struct arm_smmu_domain', 'pgtbl_ops') arm_smmu_domain_ptr, 'struct arm_smmu_domain', 'pgtbl_ops')
pg_table = 0
level = 0
if pgtbl_ops_ptr != 0:
io_pgtable_ptr = self.ramdump.container_of( io_pgtable_ptr = self.ramdump.container_of(
pgtbl_ops_ptr, 'struct io_pgtable', 'ops') pgtbl_ops_ptr, 'struct io_pgtable', 'ops')
...@@ -103,7 +106,8 @@ class IommuLib(object): ...@@ -103,7 +106,8 @@ class IommuLib(object):
io_pgtable_ptr, 'struct arm_lpae_io_pgtable', 'iop') io_pgtable_ptr, 'struct arm_lpae_io_pgtable', 'iop')
pg_table = self.ramdump.read_structure_field( pg_table = self.ramdump.read_structure_field(
arm_lpae_io_pgtable_ptr, 'struct arm_lpae_io_pgtable', 'pgd') arm_lpae_io_pgtable_ptr, 'struct arm_lpae_io_pgtable',
'pgd')
level = self.ramdump.read_structure_field( level = self.ramdump.read_structure_field(
arm_lpae_io_pgtable_ptr, 'struct arm_lpae_io_pgtable', arm_lpae_io_pgtable_ptr, 'struct arm_lpae_io_pgtable',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment