Re: [PATCH] iommu/vt-d: Don't register bus-notifier under
From: Joerg Roedel
Date: Tue Oct 10 2017 - 03:21:49 EST
On Mon, Oct 09, 2017 at 06:58:13PM +0200, Jan Kiszka wrote:
> > extern int dmar_table_init(void);
> > extern int dmar_dev_scope_init(void);
> > +extern void dmar_register_bus_notifier(void);
> > extern int dmar_parse_dev_scope(void *start, void *end, int *cnt,
> > struct dmar_dev_scope **devices, u16 segment);
> > extern void *dmar_alloc_dev_scope(void *start, void *end, int *cnt);
> >
>
> Silences the warning, but locking in the init paths still smells fishy
> to me.
Yes, its certainly not optimal, but the code that runs in there also
runs at iommu hotplug time, so we can't just remove the locking there
entirely.
On the other side the warning you reported is a false-positive, it can
never dead-lock because the reverse lock-order happens only at
initialization time, but I don't know how to silence it otherwise.
Regards,
Joerg