Messages in this thread | | | Date | Thu, 18 Mar 2021 10:48:28 +0100 | From | Joerg Roedel <> | Subject | Re: [PATCH v3] iommu: Check dev->iommu in iommu_dev_xxx functions |
| |
On Wed, Mar 03, 2021 at 05:36:11PM +0000, Shameer Kolothum wrote: > The device iommu probe/attach might have failed leaving dev->iommu > to NULL and device drivers may still invoke these functions resulting > in a crash in iommu vendor driver code. > > Hence make sure we check that. > > Fixes: a3a195929d40 ("iommu: Add APIs for multiple domains per device") > Signed-off-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com> > --- > v2 --> v3 > -Removed iommu_ops from struct dev_iommu. > v1 --> v2: > -Added iommu_ops to struct dev_iommu based on the discussion with Robin. > -Rebased against iommu-tree core branch. > --- > drivers/iommu/iommu.c | 24 +++++++++++++++--------- > 1 file changed, 15 insertions(+), 9 deletions(-)
Applied, thanks.
| |