Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Saurabh Singh Sengar <ssengar@linux.microsoft.com>
Cc: bhelgaas@google.com, linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org, alexander.stein@ew.tq-group.com,
	decui@microsoft.com,
	"Krzysztof Wilczyński" <kwilczynski@kernel.org>
Subject: Re: [PATCH] PCI/sysfs: Fix race in pci sysfs creation
Date: Wed, 28 Feb 2024 09:22:22 -0600	[thread overview]
Message-ID: <20240228152222.GA272403@bhelgaas> (raw)
In-Reply-To: <20240227171458.GA16664@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net>

On Tue, Feb 27, 2024 at 09:14:58AM -0800, Saurabh Singh Sengar wrote:
> On Wed, Feb 07, 2024 at 08:30:27AM -0800, Saurabh Singh Sengar wrote:
> > On Tue, Feb 06, 2024 at 04:07:15PM -0600, Bjorn Helgaas wrote:
> > > On Fri, Dec 08, 2023 at 07:46:16PM -0800, Saurabh Sengar wrote:
> > > > Currently there is a race in calling pci_create_resource_files function
> > > > from two different therads, first therad is triggered by pci_sysfs_init
> > > > from the late initcall where as the second thread is initiated by
> > > > pci_bus_add_devices from the respective PCI drivers probe.
> ...

> > > Krzysztof has done a ton of work to convert these files to static
> > > attributes, where the device model prevents most of these races:
> > > 
> > >   506140f9c06b ("PCI/sysfs: Convert "index", "acpi_index", "label" to static attributes")
> > >   d93f8399053d ("PCI/sysfs: Convert "vpd" to static attribute")
> > >   f42c35ea3b13 ("PCI/sysfs: Convert "reset" to static attribute")
> > >   527139d738d7 ("PCI/sysfs: Convert "rom" to static attribute")
> > >   e1d3f3268b0e ("PCI/sysfs: Convert "config" to static attribute")
> > > 
> > > and he even posted a series to do the same for the resource files:
> > > 
> > >   https://lore.kernel.org/linux-pci/20210910202623.2293708-1-kw@linux.com/
> > > 
> > > I can't remember why we didn't apply that at the time, and it no
> > > longer applies cleanly, but I think that's the direction we should go.
> > 
> > Thanks for you review.
> > 
> > Please inform me if there's existing feedback explaining why this
> > series hasn't been merged yet. I am willing to further improve it
> > if necessary.
> 
> Let us know your opinion so that we can move ahead in fixing this
> long pending bug.

There's no feedback on the mailing list (I checked the link above), so
the way forward is to update the series so it applies cleanly again
and post it as a v3.

There's no need to wait for Krzysztof to refresh it, and if you have
time to do it, it would be very welcomed!  The best base would be
v6.8-rc1.

Bjorn

  reply	other threads:[~2024-02-28 15:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-09  3:46 [PATCH] PCI/sysfs: Fix race in pci sysfs creation Saurabh Sengar
2023-12-12  7:19 ` Alexander Stein
2023-12-12  8:21   ` Saurabh Singh Sengar
2023-12-12  8:28   ` Saurabh Singh Sengar
2024-01-04  5:38     ` Saurabh Singh Sengar
2024-01-20  6:41       ` Saurabh Singh Sengar
2024-02-02  7:17         ` Saurabh Singh Sengar
2024-02-06 22:07 ` Bjorn Helgaas
2024-02-07 16:30   ` Saurabh Singh Sengar
2024-02-27 17:14     ` Saurabh Singh Sengar
2024-02-28 15:22       ` Bjorn Helgaas [this message]
2024-02-28 17:22         ` Krzysztof Wilczyński
2024-02-28 18:16           ` Saurabh Singh Sengar
2024-04-15 18:15           ` [EXTERNAL] " Saurabh Singh Sengar
2024-03-02  8:57   ` Lukas Wunner

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=20240228152222.GA272403@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=alexander.stein@ew.tq-group.com \
    --cc=bhelgaas@google.com \
    --cc=decui@microsoft.com \
    --cc=kwilczynski@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=ssengar@linux.microsoft.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox