lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 8 Jul 2014 11:20:28 +0200
From:	Paolo Pisati <p.pisati@...il.com>
To:	Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>
Cc:	Ezequiel Garcia <ezequiel.garcia@...e-electrons.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Andrew Lunn <andrew@...n.ch>,
	Jason Cooper <jason@...edaemon.net>,
	Joerg Roedel <joro@...tes.org>, Hiroshi.DOYU@...ia.com,
	linux-kernel@...r.kernel.org, iommu@...ts.linux-foundation.org,
	Laurent Pinchart <laurent.pinchart@...asonboard.com>,
	Gregory CLEMENT <gregory.clement@...e-electrons.com>,
	Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>,
	Florian Vaussard <florian.vaussard@...l.ch>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>
Subject: Re: 3.16rc3 multiplatform, Armada 370 and IOMMU: unbootable kernel

On Tue, Jul 8, 2014 at 9:41 AM, Thomas Petazzoni
<thomas.petazzoni@...e-electrons.com> wrote:
> Dear Ezequiel Garcia,
>
> On Mon, 7 Jul 2014 20:37:58 -0300, Ezequiel Garcia wrote:
>
>> It seems bus_register_notifier() is been called for platform and pci devices
>> with the *same* notifier block. Haven't looked close enough, but you mentioned
>> that could cause trouble?
>>
>> This patch fixes the issue here:
>>
>> diff --git a/arch/arm/mach-mvebu/coherency.c b/arch/arm/mach-mvebu/coherency.c
>> index 477202f..2bdc323 100644
>> --- a/arch/arm/mach-mvebu/coherency.c
>> +++ b/arch/arm/mach-mvebu/coherency.c
>> @@ -292,6 +292,10 @@ static struct notifier_block mvebu_hwcc_nb = {
>>       .notifier_call = mvebu_hwcc_notifier,
>>  };
>>
>> +static struct notifier_block mvebu_hwcc_pci_nb = {
>> +     .notifier_call = mvebu_hwcc_notifier,
>> +};
>> +
>>  static void __init armada_370_coherency_init(struct device_node *np)
>>  {
>>       struct resource res;
>> @@ -427,7 +431,7 @@ static int __init coherency_pci_init(void)
>>  {
>>       if (coherency_available())
>>               bus_register_notifier(&pci_bus_type,
>> -                                    &mvebu_hwcc_nb);
>> +                                    &mvebu_hwcc_pci_nb);
>>       return 0;
>>  }
>>
>> Paolo, can you apply it and confirm it fixes the problem?
>>
>> Greg, can you confirm using the same notifier block pointer
>> for two different bus types makes the bus notifier go nuts?
>
> Looking at how notifier_chain_register() is implemented (which gets
> called by bus_register_notifier() ->
> blocking_notifier_chain_register()), I indeed don't see how a single
> 'struct notifier_block' can be registered on multiple notifier chains,
> so I believe your patch is correct.
>

yes, i confim this patch fixes my issue, thanks!

-- 
bye,
p.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ