Re: PCI: Race condition in pci_create_sysfs_dev_files

2021-04-07 Thread Petr Štetiar
Pali Rohár [2021-04-07 16:51:47]: > Could you run 'dmesg' and provide its output? So also missing / garbage > messages would be visible. Adding it inline for archives. It's log from serial console, with output of dmesg at the bottom so one can compare if needed. [0.00] Booting Linux

Re: PCI: Race condition in pci_create_sysfs_dev_files

2021-04-07 Thread Pali Rohár
On Wednesday 07 April 2021 16:25:46 Petr Štetiar wrote: > Pali Rohár [2020-10-07 10:12:27]: > > Hi, > > [adding Koen to Cc:] > > > I'm hitting these race conditions randomly on pci aardvark controller > > driver- I prepared patch which speed up initialization of this driver, > > but also

Re: PCI: Race condition in pci_create_sysfs_dev_files

2021-04-07 Thread Pali Rohár
On Thursday 16 July 2020 13:04:23 Pali Rohár wrote: > Hello Bjorn! > > I see following error message in dmesg which looks like a race condition: > > sysfs: cannot create duplicate filename > '/devices/platform/soc/d007.pcie/pci:00/:00:00.0/config' > > I looked at it deeper and

Re: PCI: Race condition in pci_create_sysfs_dev_files

2021-04-07 Thread Petr Štetiar
Pali Rohár [2020-10-07 10:12:27]: Hi, [adding Koen to Cc:] > I'm hitting these race conditions randomly on pci aardvark controller > driver- I prepared patch which speed up initialization of this driver, > but also increase probability that it hits above race conditions :-( it seems, that I'm

Re: PCI: Race condition in pci_create_sysfs_dev_files

2020-11-15 Thread Pali Rohár
On Sunday 15 November 2020 07:19:36 Krzysztof Wilczyński wrote: > Hello Pali! > > Sincere apologies for taking a long time to get back to you. > > On 20-11-04 17:29:31, Pali Rohár wrote: > > [...] > > > > Krzysztof, as Bjorn wrote, do you want to take this issue? > > > [...] > > Yes. I

Re: PCI: Race condition in pci_create_sysfs_dev_files

2020-11-14 Thread Krzysztof Wilczyński
Hello Pali! Sincere apologies for taking a long time to get back to you. On 20-11-04 17:29:31, Pali Rohár wrote: [...] > > Krzysztof, as Bjorn wrote, do you want to take this issue? > [...] Yes. I already talked to Bjorn about this briefly, and thus I am more than happy to take care about

Re: PCI: Race condition in pci_create_sysfs_dev_files

2020-11-04 Thread Pali Rohár
On Tuesday 06 October 2020 17:22:22 Bjorn Helgaas wrote: > It's not obvious from the code why we need pci_sysfs_init(), but > Yinghai hinted [1] that we need to create sysfs after assigning > resources. I experimented by removing pci_sysfs_init() and skipping > the ROM BAR sizing. In that case,

Re: PCI: Race condition in pci_create_sysfs_dev_files

2020-11-04 Thread Pali Rohár
Hello Krzysztof! On Friday 09 October 2020 10:08:53 Pali Rohár wrote: > On Thursday 08 October 2020 14:59:07 Bjorn Helgaas wrote: > > On Wed, Oct 07, 2020 at 11:14:34AM -0500, Bjorn Helgaas wrote: > > > On Wed, Oct 07, 2020 at 10:14:00AM +0200, Pali Rohár wrote: > > > > On Wednesday 07 October

Re: PCI: Race condition in pci_create_sysfs_dev_files

2020-10-09 Thread Pali Rohár
On Thursday 08 October 2020 14:59:07 Bjorn Helgaas wrote: > On Wed, Oct 07, 2020 at 11:14:34AM -0500, Bjorn Helgaas wrote: > > On Wed, Oct 07, 2020 at 10:14:00AM +0200, Pali Rohár wrote: > > > On Wednesday 07 October 2020 12:47:40 Oliver O'Halloran wrote: > > > > On Wed, Oct 7, 2020 at 10:26 AM

Re: PCI: Race condition in pci_create_sysfs_dev_files

2020-10-08 Thread Bjorn Helgaas
On Wed, Oct 07, 2020 at 11:14:34AM -0500, Bjorn Helgaas wrote: > On Wed, Oct 07, 2020 at 10:14:00AM +0200, Pali Rohár wrote: > > On Wednesday 07 October 2020 12:47:40 Oliver O'Halloran wrote: > > > On Wed, Oct 7, 2020 at 10:26 AM Bjorn Helgaas wrote: > > > > > > > > I'm not really a fan of this

Re: PCI: Race condition in pci_create_sysfs_dev_files

2020-10-07 Thread Bjorn Helgaas
On Wed, Oct 07, 2020 at 10:14:00AM +0200, Pali Rohár wrote: > On Wednesday 07 October 2020 12:47:40 Oliver O'Halloran wrote: > > On Wed, Oct 7, 2020 at 10:26 AM Bjorn Helgaas wrote: > > > > > > I'm not really a fan of this because pci_sysfs_init() is a bit of a > > > hack to begin with, and this

Re: PCI: Race condition in pci_create_sysfs_dev_files

2020-10-07 Thread Pali Rohár
On Wednesday 07 October 2020 12:47:40 Oliver O'Halloran wrote: > On Wed, Oct 7, 2020 at 10:26 AM Bjorn Helgaas wrote: > > > > I'm not really a fan of this because pci_sysfs_init() is a bit of a > > hack to begin with, and this makes it even more complicated. > > > > It's not obvious from the code

Re: PCI: Race condition in pci_create_sysfs_dev_files

2020-10-07 Thread Pali Rohár
On Tuesday 06 October 2020 17:22:22 Bjorn Helgaas wrote: > [+cc Krzysztof, Yinghai] > > On Wed, Sep 09, 2020 at 01:28:50PM +0200, Pali Rohár wrote: > > Hello! I'm adding more people to loop. > > > > Can somebody look at these race conditions and my patch? > > > > On Friday 14 August 2020

Re: PCI: Race condition in pci_create_sysfs_dev_files

2020-10-06 Thread Oliver O'Halloran
On Wed, Oct 7, 2020 at 10:26 AM Bjorn Helgaas wrote: > > I'm not really a fan of this because pci_sysfs_init() is a bit of a > hack to begin with, and this makes it even more complicated. > > It's not obvious from the code why we need pci_sysfs_init(), but > Yinghai hinted [1] that we need to

Re: PCI: Race condition in pci_create_sysfs_dev_files

2020-10-06 Thread Bjorn Helgaas
[+cc Krzysztof, Yinghai] On Wed, Sep 09, 2020 at 01:28:50PM +0200, Pali Rohár wrote: > Hello! I'm adding more people to loop. > > Can somebody look at these race conditions and my patch? > > On Friday 14 August 2020 10:08:24 Pali Rohár wrote: > > Hello! I would like to remind this issue which I

Re: PCI: Race condition in pci_create_sysfs_dev_files

2020-10-05 Thread Bjorn Helgaas
On Mon, Oct 05, 2020 at 10:20:18AM +0200, Pali Rohár wrote: > PING? Sorry, I guess nobody has had the right combination of time, interest, and knowledge to work on this. I'll try to take a look this week. > On Wednesday 09 September 2020 13:28:50 Pali Rohár wrote: > > Hello! I'm adding more

Re: PCI: Race condition in pci_create_sysfs_dev_files

2020-10-05 Thread Pali Rohár
PING? On Wednesday 09 September 2020 13:28:50 Pali Rohár wrote: > Hello! I'm adding more people to loop. > > Can somebody look at these race conditions and my patch? > > On Friday 14 August 2020 10:08:24 Pali Rohár wrote: > > Hello! I would like to remind this issue which I reported month ago.

Re: PCI: Race condition in pci_create_sysfs_dev_files

2020-09-09 Thread Pali Rohár
Hello! I'm adding more people to loop. Can somebody look at these race conditions and my patch? On Friday 14 August 2020 10:08:24 Pali Rohár wrote: > Hello! I would like to remind this issue which I reported month ago. > > On Thursday 16 July 2020 13:04:23 Pali Rohár wrote: > > Hello Bjorn! > >

Re: PCI: Race condition in pci_create_sysfs_dev_files

2020-08-14 Thread Pali Rohár
Hello! I would like to remind this issue which I reported month ago. On Thursday 16 July 2020 13:04:23 Pali Rohár wrote: > Hello Bjorn! > > I see following error message in dmesg which looks like a race condition: > > sysfs: cannot create duplicate filename >

PCI: Race condition in pci_create_sysfs_dev_files

2020-07-16 Thread Pali Rohár
Hello Bjorn! I see following error message in dmesg which looks like a race condition: sysfs: cannot create duplicate filename '/devices/platform/soc/d007.pcie/pci:00/:00:00.0/config' I looked at it deeper and found out that in PCI subsystem code is race condition between