• Will Deacon's avatar
    iommu/arm-smmu: fix capability checking prior to device attach · d3bca166
    Will Deacon authored
    If somebody attempts to check the capability of an IOMMU domain prior to
    device attach, then we'll try to dereference a NULL SMMU pointer through
    the SMMU domain (since we can't determine the actual SMMU instance until
    we have a device attached).
    
    This patch fixes the capability check so that non-global features are
    reported as being absent when no device is attached to the domain.
    Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
    d3bca166
arm-smmu.c 51.8 KB