lkml.org 
[lkml]   [2014]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] iommu/core: fix bus notifier breakage
On Sun, Sep 21, 2014 at 01:58:24PM -0400, Mark Salter wrote:
> iommu_bus_init() registers a bus notifier on the given bus by using
> a statically defined notifier block:
>
> static struct notifier_block iommu_bus_nb = {
> .notifier_call = iommu_bus_notifier,
> };
>
> This same notifier block is used for all busses. This causes a
> problem for notifiers registered after iommu has registered this
> callback on multiple busses. The problem is that a subsequent
> notifier being registered on a bus which has this iommu notifier
> will also get linked in to the notifier list of all other busses
> which have this iommu notifier.
>
> This patch fixes this by allocating the notifier_block at runtime.
> Some error checking is also added to catch any allocation failure
> or notifier registration error.
>
> Signed-off-by: Mark Salter <msalter@redhat.com>
> ---
> drivers/iommu/iommu.c | 26 ++++++++++++++++----------
> 1 file changed, 16 insertions(+), 10 deletions(-)

Makes sense, applied. Where have you hit this condition where IOMMUs for
different buses are registered?


Joerg



\
 
 \ /
  Last update: 2014-09-25 17:21    [W:0.028 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site