diff options
author | Robin Murphy <robin.murphy@arm.com> | 2015-12-04 18:52:58 +0100 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2015-12-17 13:05:34 +0100 |
commit | 2eb97c78613082f308c0b39366c034cb589b8ee9 (patch) | |
tree | 02407e2cd82ce289806c55c5cc3325e25a397f46 /drivers/mmc | |
parent | iommu/arm-smmu: Handle unknown CERROR values gracefully (diff) | |
download | linux-2eb97c78613082f308c0b39366c034cb589b8ee9.tar.xz linux-2eb97c78613082f308c0b39366c034cb589b8ee9.zip |
iommu/io-pgtable-arm: Avoid dereferencing bogus PTEs
In the case of corrupted page tables, or when an invalid size is given,
__arm_lpae_unmap() may recurse beyond the maximum number of levels.
Unfortunately the detection of this error condition only happens *after*
calculating a nonsense offset from something which might not be a valid
table pointer and dereferencing that to see if it is a valid PTE.
Make things a little more robust by checking the level is valid before
doing anything which depends on it being so.
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'drivers/mmc')
0 files changed, 0 insertions, 0 deletions