summaryrefslogtreecommitdiffstats
path: root/include/asm-generic/mm_hooks.h
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2016-07-29 11:15:37 +0100
committerWill Deacon <will.deacon@arm.com>2016-08-19 09:43:25 +0100
commitaea2037e0d3e23c3be1498feae29f71ca997d9e6 (patch)
treef9d6f8fafec851f0067544951b6a9ce532ce93a9 /include/asm-generic/mm_hooks.h
parente633fc7a1347528c3b4a6bbdeb41f5d63988242c (diff)
downloadblackbird-op-linux-aea2037e0d3e23c3be1498feae29f71ca997d9e6.tar.gz
blackbird-op-linux-aea2037e0d3e23c3be1498feae29f71ca997d9e6.zip
iommu/arm-smmu: Fix CMDQ error handling
In the unlikely event of a global command queue error, the ARM SMMUv3 driver attempts to convert the problematic command into a CMD_SYNC and resume the command queue. Unfortunately, this code is pretty badly broken: 1. It uses the index into the error string table as the CMDQ index, so we probably read the wrong entry out of the queue 2. The arguments to queue_write are the wrong way round, so we end up writing from the queue onto the stack. These happily cancel out, so the kernel is likely to stay alive, but the command queue will probably fault again when we resume. This patch fixes the error handling code to use the correct queue index and write back the CMD_SYNC to the faulting entry. Cc: <stable@vger.kernel.org> Fixes: 48ec83bcbcf5 ("iommu/arm-smmu: Add initial driver support for ARM SMMUv3 devices") Reported-by: Diwakar Subraveti <Diwakar.Subraveti@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'include/asm-generic/mm_hooks.h')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud