APPLIED: [SRU][B/master-next][PATCH] iommu/ipmmu-vmsa: Don't register as BUS IOMMU if machine doesn't have

Stefan Bader stefan.bader at
Mon Oct 1 13:06:35 UTC 2018

On 11.09.2018 13:00, Paolo Pisati wrote:
> BugLink:
> [Impact]
> The ipmmu-vmsa driver registers itself to the system via an initcall() to
> ipmmu_init(), and in case it's the first (or the only) iommu driver, it
> registers its iommu ops to the platform bus - in the tegra2 case, there's no
> iommu hardware, so all drivers bail out, except for the ipmmu-vmsa.
> Later on, during boot, when the Tegra host1x is probing
> (drivers/gpu/host1x/dev.c::host1x_probe()), it checks if an iommu device is
> present (drivers/iommu/iommu.c::iommu_present() that does so by identifying if
> any iommu ops were registered) and attach to the supposedly present device,
> incurring in a null pointer dereference.
> Upstream quickly acknowledged the problem, and rolled a patch to restrict the
> ipmmu-vmsa driver to register if and only if a compatible device is present.
> The fix appeared initially in 4.19, and was later backported via stable to
> 4.18.x, and this is a clean cherry pick of that commit.
> [Fix]
> Apply the attached patch and recompile.
> [How to test]
> Try to boot a patched kernel on a Tegra2 board.
> [Regession potential]
> None, the fix is trivial.
> --
> Dmitry Osipenko (1):
>   iommu/ipmmu-vmsa: Don't register as BUS IOMMU if machine doesn't have
>  drivers/iommu/ipmmu-vmsa.c | 7 +++++++
>  1 file changed, 7 insertions(+)
Applied to bionic/master-next. Thanks.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the kernel-team mailing list