[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230209055413.k2jbmqvqg636jrgw@vireshk-i7>
Date: Thu, 9 Feb 2023 11:24:13 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Oleksandr Tyshchenko <olekstysh@...il.com>
Cc: xen-devel@...ts.xenproject.org, linux-kernel@...r.kernel.org,
Oleksandr Tyshchenko <oleksandr_tyshchenko@...m.com>,
Juergen Gross <jgross@...e.com>,
Stefano Stabellini <sstabellini@...nel.org>
Subject: Re: [PATCH] xen/grant-dma-iommu: Implement a dummy probe_device()
callback
On 08-02-23, 17:36, Oleksandr Tyshchenko wrote:
> From: Oleksandr Tyshchenko <oleksandr_tyshchenko@...m.com>
>
> Update stub IOMMU driver (which main purpose is to reuse generic
> IOMMU device-tree bindings by Xen grant DMA-mapping layer on Arm)
> according to the recent changes done in the following
> commit 57365a04c921 ("iommu: Move bus setup to IOMMU device registration").
>
> With probe_device() callback being called during IOMMU device registration,
> the uninitialized callback just leads to the "kernel NULL pointer
> dereference" issue during boot. Fix that by adding a dummy callback.
>
> Looks like the release_device() callback is not mandatory to be
> implemented as IOMMU framework makes sure that callback is initialized
> before dereferencing.
>
> Reported-by: Viresh Kumar <viresh.kumar@...aro.org>
> Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@...m.com>
> ---
> drivers/xen/grant-dma-iommu.c | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
Tested-by: Viresh Kumar <viresh.kumar@...aro.org>
--
viresh
Powered by blists - more mailing lists