All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dexuan-Linux Cui <dexuan.linux@gmail.com>
To: "Pali Rohár" <pali@kernel.org>
Cc: "Koen Vandeputte" <koen.vandeputte@citymesh.com>,
	"Petr Štetiar" <ynezz@true.cz>,
	"Bjorn Helgaas" <helgaas@kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	linux-pci@vger.kernel.org,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Lorenzo Pieralisi" <lorenzo.pieralisi@arm.com>,
	"Gregory Clement" <gregory.clement@bootlin.com>,
	"Andrew Lunn" <andrew@lunn.ch>,
	"Krzysztof Wilczyński" <kw@linux.com>,
	"Yinghai Lu" <yinghai@kernel.org>,
	"Dexuan Cui" <decui@microsoft.com>
Subject: Re: PCI: Race condition in pci_create_sysfs_dev_files
Date: Tue, 12 Oct 2021 23:18:44 -0700	[thread overview]
Message-ID: <CAA42JLZCE0CFUJHVZLT77YvPap49_cGiAMMt2E-B7X0tzST6jg@mail.gmail.com> (raw)
In-Reply-To: <20210625115402.jwga35xmknmo4vdk@pali>

On Fri, Jun 25, 2021 at 4:55 AM Pali Rohár <pali@kernel.org> wrote:
>
> Hello!
>
> On Friday 25 June 2021 13:29:00 Koen Vandeputte wrote:
> > ...
> It is same race condition which I described in the first email of this
> email thread. I described exactly when it happens. I'm not able to
> trigger it with new kernels but as we know race conditions are hard to
> trigger...
>
> So result is that we know about it, just fix is not ready yet as it is
> not easy to fix it.
>
> Krzysztof has been working on fixing it, so maybe can provide an
> update...

I think we're seeing the same issue with a Linux VM on Hyper-V. Here
the kernel is https://git.launchpad.net/~canonical-kernel/ubuntu/+source/linux-azure/+git/bionic/tree/?h=Ubuntu-azure-5.4-5.4.0-1061.64_18.04.1

[    4.680707] hv_pci 47505500-0003-0000-3130-444531334632: PCI VMBus
probing: Using version 0x10002
[    4.730457] hv_pci 47505500-0003-0000-3130-444531334632: PCI host
bridge to bus 0003:00
[    4.735577] pci_bus 0003:00: root bus resource [mem
0x43000000-0x43ffffff window]
[    4.742189] pci_bus 0003:00: root bus resource [mem
0x1020000000-0x1031ffffff window]
[    4.747027] pci 0003:00:00.0: [10de:13f2] type 00 class 0x030000
[    4.770114] pci 0003:00:00.0: reg 0x10: [mem 0x43000000-0x43ffffff]
[    4.792153] pci 0003:00:00.0: reg 0x14: [mem
0x1020000000-0x102fffffff 64bit pref]
[    4.814022] pci 0003:00:00.0: reg 0x1c: [mem
0x1030000000-0x1031ffffff 64bit pref]
[    4.854830] pci 0003:00:00.0: Enabling HDA controller
[    4.869665] pci 0003:00:00.0: vgaarb: VGA device added:
decodes=io+mem,owns=mem,locks=none
[    4.879399] pci 0003:00:00.0: BAR 1: assigned [mem
0x1020000000-0x102fffffff 64bit pref]
[    4.903880] pci 0003:00:00.0: BAR 3: assigned [mem
0x1030000000-0x1031ffffff 64bit pref]
[    4.927977] pci 0003:00:00.0: BAR 0: assigned [mem 0x43000000-0x43ffffff]
[    4.938162] sysfs: cannot create duplicate filename
'/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A03:00/device:07/VMBUS:01/47505500-0003-0000-3130-444531334632/pci0003:00/0003:00:00.0/config'
[    4.951818] CPU: 0 PID: 135 Comm: kworker/0:2 Not tainted
5.4.0-1061-azure #64~18.04.1-Ubuntu
[    4.951820] Hardware name: Microsoft Corporation Virtual
Machine/Virtual Machine, BIOS 090007  06/02/2017
[    4.955812] Workqueue: hv_pri_chan vmbus_add_channel_work
[    4.955812] Call Trace:
[    4.955812]  dump_stack+0x57/0x6d
[    4.955812]  sysfs_warn_dup+0x5b/0x70
[    4.955812]  sysfs_add_file_mode_ns+0x158/0x180
[    4.955812]  sysfs_create_bin_file+0x64/0x90
[    4.955812]  pci_create_sysfs_dev_files+0x72/0x270
[    4.955812]  pci_bus_add_device+0x30/0x80
[    4.955812]  pci_bus_add_devices+0x31/0x70
[    4.955812]  hv_pci_probe+0x48c/0x650
[    4.955812]  vmbus_probe+0x3e/0x90
[    4.955812]  really_probe+0xf5/0x440
[    4.955812]  driver_probe_device+0x11b/0x130
[    4.955812]  __device_attach_driver+0x7b/0xe0
[    4.955812]  ? driver_allows_async_probing+0x60/0x60
[    4.955812]  bus_for_each_drv+0x6e/0xb0
[    4.955812]  __device_attach+0xe4/0x160
[    4.955812]  device_initial_probe+0x13/0x20
[    4.955812]  bus_probe_device+0x92/0xa0
[    4.955812]  device_add+0x402/0x690
[    4.955812]  device_register+0x1a/0x20
[    4.955812]  vmbus_device_register+0x5e/0xf0
[    4.955812]  vmbus_add_channel_work+0x2c4/0x640
[    4.955812]  process_one_work+0x209/0x400
[    4.955812]  worker_thread+0x34/0x400
[    4.955812]  kthread+0x121/0x140
[    4.955812]  ? process_one_work+0x400/0x400
[    4.955812]  ? kthread_park+0x90/0x90
[    4.955812]  ret_from_fork+0x35/0x40

Thanks,
Dexuan

  reply	other threads:[~2021-10-13  6:21 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-16 11:04 PCI: Race condition in pci_create_sysfs_dev_files Pali Rohár
2020-08-14  8:08 ` Pali Rohár
2020-09-09 11:28   ` Pali Rohár
2020-10-05  8:20     ` Pali Rohár
2020-10-05 13:54       ` Bjorn Helgaas
2020-10-06 22:22     ` Bjorn Helgaas
2020-10-07  1:47       ` Oliver O'Halloran
2020-10-07  8:14         ` Pali Rohár
2020-10-07 16:14           ` Bjorn Helgaas
2020-10-08 19:59             ` Bjorn Helgaas
2020-10-09  8:08               ` Pali Rohár
2020-11-04 16:29                 ` Pali Rohár
2020-11-15  6:19                   ` Krzysztof Wilczyński
2020-11-15 12:10                     ` Pali Rohár
2020-10-07  8:12       ` Pali Rohár
2021-04-07 14:25         ` Petr Štetiar
2021-04-07 14:51           ` Pali Rohár
2021-04-07 15:30             ` Petr Štetiar
2021-06-25 11:29               ` Koen Vandeputte
2021-06-25 11:54                 ` Pali Rohár
2021-10-13  6:18                   ` Dexuan-Linux Cui [this message]
2021-11-18  3:09                     ` Krzysztof Wilczyński
2021-11-18  3:42                       ` Dexuan Cui
2020-11-04 16:46       ` Pali Rohár
2021-04-07 14:41 ` Pali Rohár

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAA42JLZCE0CFUJHVZLT77YvPap49_cGiAMMt2E-B7X0tzST6jg@mail.gmail.com \
    --to=dexuan.linux@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=bhelgaas@google.com \
    --cc=decui@microsoft.com \
    --cc=gregory.clement@bootlin.com \
    --cc=helgaas@kernel.org \
    --cc=koen.vandeputte@citymesh.com \
    --cc=kw@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=pali@kernel.org \
    --cc=yinghai@kernel.org \
    --cc=ynezz@true.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.