mbox series

[v2,0/3] PCI: Revert / replace the cfg_access_lock lockdep mechanism

Message ID 171711745834.1628941.5259278474013108507.stgit@dwillia2-xfh.jf.intel.com
Headers show
Series PCI: Revert / replace the cfg_access_lock lockdep mechanism | expand

Message

Dan Williams May 31, 2024, 1:04 a.m. UTC
Changes since v1 [1]:
- split out the new warning into its own patch (Bjorn)
- include the provisional fix to the pci_reset_bus() path

[1]: http://lore.kernel.org/r/171709637423.1568751.11773767969980847536.stgit@dwillia2-xfh.jf.intel.com

Hi Bjorn,

Here is the targeted revert of the cfg_access_lock lockdep
infrastructure, but with the new proposed warning for catching "unlocked
pci_bridge_secondary_bus_reset()" events broken out into its own change.
I also included the proposed fix for at least one known case where
pci_bridge_secondary_bus_reset() is being called without
cfg_access_lock.

Given there may be more cases to unwind, and the fact that I am not
convinced patch3 will be problem free I would, as you suggested,
consider patch2 and patch3 v6.11 material. Patch1 is urgent for v6.10-rc
to put out these lockdep false positive reports.

---

Dan Williams (3):
      PCI: Revert the cfg_access_lock lockdep mechanism
      PCI: Warn on missing cfg_access_lock during secondary bus reset
      PCI: Add missing bridge lock to pci_bus_lock()


 drivers/pci/access.c    |    4 ----
 drivers/pci/pci.c       |    8 +++++++-
 drivers/pci/probe.c     |    3 ---
 include/linux/lockdep.h |    5 -----
 include/linux/pci.h     |    2 --
 5 files changed, 7 insertions(+), 15 deletions(-)

base-commit: 56fb6f92854f29dcb6c3dc3ba92eeda1b615e88c

Comments

Bjorn Helgaas May 31, 2024, 9:31 p.m. UTC | #1
On Thu, May 30, 2024 at 06:04:18PM -0700, Dan Williams wrote:
> Changes since v1 [1]:
> - split out the new warning into its own patch (Bjorn)
> - include the provisional fix to the pci_reset_bus() path
> 
> [1]: http://lore.kernel.org/r/171709637423.1568751.11773767969980847536.stgit@dwillia2-xfh.jf.intel.com
> 
> Hi Bjorn,
> 
> Here is the targeted revert of the cfg_access_lock lockdep
> infrastructure, but with the new proposed warning for catching "unlocked
> pci_bridge_secondary_bus_reset()" events broken out into its own change.
> I also included the proposed fix for at least one known case where
> pci_bridge_secondary_bus_reset() is being called without
> cfg_access_lock.
> 
> Given there may be more cases to unwind, and the fact that I am not
> convinced patch3 will be problem free I would, as you suggested,
> consider patch2 and patch3 v6.11 material. Patch1 is urgent for v6.10-rc
> to put out these lockdep false positive reports.
> 
> ---
> 
> Dan Williams (3):
>       PCI: Revert the cfg_access_lock lockdep mechanism
>       PCI: Warn on missing cfg_access_lock during secondary bus reset
>       PCI: Add missing bridge lock to pci_bus_lock()
> 
> 
>  drivers/pci/access.c    |    4 ----
>  drivers/pci/pci.c       |    8 +++++++-
>  drivers/pci/probe.c     |    3 ---
>  include/linux/lockdep.h |    5 -----
>  include/linux/pci.h     |    2 --
>  5 files changed, 7 insertions(+), 15 deletions(-)

Thanks, I applied the first to pci/for-linus for v6.10, and the others
to pci/reset for v6.11.

There will be a trivial conflict in -next and the v6.11 merge window
since pci/reset is based on v6.10-rc1 and contains some of the code
removed by the first patch.

Bjorn
Hans de Goede June 3, 2024, 7:49 p.m. UTC | #2
Hi,

On 5/31/24 3:04 AM, Dan Williams wrote:
> Changes since v1 [1]:
> - split out the new warning into its own patch (Bjorn)
> - include the provisional fix to the pci_reset_bus() path
> 
> [1]: http://lore.kernel.org/r/171709637423.1568751.11773767969980847536.stgit@dwillia2-xfh.jf.intel.com
> 
> Hi Bjorn,
> 
> Here is the targeted revert of the cfg_access_lock lockdep
> infrastructure, but with the new proposed warning for catching "unlocked
> pci_bridge_secondary_bus_reset()" events broken out into its own change.
> I also included the proposed fix for at least one known case where
> pci_bridge_secondary_bus_reset() is being called without
> cfg_access_lock.
> 
> Given there may be more cases to unwind, and the fact that I am not
> convinced patch3 will be problem free I would, as you suggested,
> consider patch2 and patch3 v6.11 material. Patch1 is urgent for v6.10-rc
> to put out these lockdep false positive reports.

I can confirm that this series fixes the lockdep errors which
I was seeing:

Tested-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans





> ---
> 
> Dan Williams (3):
>       PCI: Revert the cfg_access_lock lockdep mechanism
>       PCI: Warn on missing cfg_access_lock during secondary bus reset
>       PCI: Add missing bridge lock to pci_bus_lock()
> 
> 
>  drivers/pci/access.c    |    4 ----
>  drivers/pci/pci.c       |    8 +++++++-
>  drivers/pci/probe.c     |    3 ---
>  include/linux/lockdep.h |    5 -----
>  include/linux/pci.h     |    2 --
>  5 files changed, 7 insertions(+), 15 deletions(-)
> 
> base-commit: 56fb6f92854f29dcb6c3dc3ba92eeda1b615e88c
>
Bjorn Helgaas June 3, 2024, 8:37 p.m. UTC | #3
On Mon, Jun 03, 2024 at 09:49:39PM +0200, Hans de Goede wrote:
> Hi,
> 
> On 5/31/24 3:04 AM, Dan Williams wrote:
> > Changes since v1 [1]:
> > - split out the new warning into its own patch (Bjorn)
> > - include the provisional fix to the pci_reset_bus() path
> > 
> > [1]: http://lore.kernel.org/r/171709637423.1568751.11773767969980847536.stgit@dwillia2-xfh.jf.intel.com
> > 
> > Hi Bjorn,
> > 
> > Here is the targeted revert of the cfg_access_lock lockdep
> > infrastructure, but with the new proposed warning for catching "unlocked
> > pci_bridge_secondary_bus_reset()" events broken out into its own change.
> > I also included the proposed fix for at least one known case where
> > pci_bridge_secondary_bus_reset() is being called without
> > cfg_access_lock.
> > 
> > Given there may be more cases to unwind, and the fact that I am not
> > convinced patch3 will be problem free I would, as you suggested,
> > consider patch2 and patch3 v6.11 material. Patch1 is urgent for v6.10-rc
> > to put out these lockdep false positive reports.
> 
> I can confirm that this series fixes the lockdep errors which
> I was seeing:
> 
> Tested-by: Hans de Goede <hdegoede@redhat.com>

Added to the three patches in this series, thanks, Hans!

> > ---
> > 
> > Dan Williams (3):
> >       PCI: Revert the cfg_access_lock lockdep mechanism
> >       PCI: Warn on missing cfg_access_lock during secondary bus reset
> >       PCI: Add missing bridge lock to pci_bus_lock()
> > 
> > 
> >  drivers/pci/access.c    |    4 ----
> >  drivers/pci/pci.c       |    8 +++++++-
> >  drivers/pci/probe.c     |    3 ---
> >  include/linux/lockdep.h |    5 -----
> >  include/linux/pci.h     |    2 --
> >  5 files changed, 7 insertions(+), 15 deletions(-)
> > 
> > base-commit: 56fb6f92854f29dcb6c3dc3ba92eeda1b615e88c
> > 
>