lkml.org 
[lkml]   [2017]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] iommu/vt-d: Don't register bus-notifier under
From
Date
On 2017-10-10 09:21, Joerg Roedel wrote:
> 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.

It may not just be "sub-optimal" but rather borken: "One example:
dmar_table_init is not consistently protected by dmar_global_lock."

Jan

>
> 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
>

--
Siemens AG, Corporate Technology, CT RDA ITP SES-DE
Corporate Competence Center Embedded Linux

\
 
 \ /
  Last update: 2017-10-10 09:25    [W:0.150 / U:2.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site