Skip to content
Commit 3bd4f911 authored by Jan Niehusmann's avatar Jan Niehusmann Committed by Joerg Roedel
Browse files

iommu/vt-d: Fix overflow of iommu->domains array



The valid range of 'did' in get_iommu_domain(*iommu, did)
is 0..cap_ndoms(iommu->cap), so don't exceed that
range in free_all_cpu_cached_iovas().

The user-visible impact of the out-of-bounds access is the machine
hanging on suspend-to-ram. It is, in fact, a kernel panic, but due
to already suspended devices, that's often not visible to the user.

Fixes: 22e2f9fa ("iommu/vt-d: Use per-cpu IOVA caching")
Signed-off-by: default avatarJan Niehusmann <jan@gondor.com>
Tested-By: default avatarMarius Vlad <marius.c.vlad@intel.com>
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 583248e6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment