[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YFMh7E5OiMVkJCU9@8bytes.org>
Date: Thu, 18 Mar 2021 10:48:28 +0100
From: Joerg Roedel <joro@...tes.org>
To: Shameer Kolothum <shameerali.kolothum.thodi@...wei.com>
Cc: linux-kernel@...r.kernel.org, iommu@...ts.linux-foundation.org,
robin.murphy@....com, jean-philippe@...aro.org, will@...nel.org,
prime.zeng@...ilicon.com, linuxarm@...neuler.org
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@...wei.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.
Powered by blists - more mailing lists