[Intel-gfx] [PATCH] drm/i915/selftests: Push the fake iommu device from the stack to data
Matthew Auld
matthew.william.auld at gmail.com
Tue Aug 18 19:10:18 UTC 2020
On Tue, 18 Aug 2020 at 19:43, Chris Wilson <chris at chris-wilson.co.uk> wrote:
>
> Since we store a pointer to the fake iommu device that is allocated on
> the stack, as soon as we leave the function it goes out of scope and any
> future dereference is undefined behaviour. Just in case we may need to
> look at the fake iommu device after initialiation, move the allocation
> from the stack into the data.
>
> Fixes: 01b9d4e21148 ("iommu/vt-d: Use dev_iommu_priv_get/set()")
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld at intel.com>
More information about the Intel-gfx
mailing list