Since Questing will be released with the 6.17 kernel, all of the commits
mentioned above will be included by default. Therefore, the fix must be
backported only to Plucky (6.14) and Noble (6.8).

** Also affects: linux (Ubuntu Plucky)
   Importance: Undecided
       Status: New

** Also affects: linux (Ubuntu Noble)
   Importance: Undecided
       Status: New

** Changed in: linux (Ubuntu)
       Status: New => Invalid

** Changed in: linux (Ubuntu Noble)
       Status: New => In Progress

** Changed in: linux (Ubuntu Plucky)
       Status: New => In Progress

** Changed in: linux (Ubuntu Plucky)
     Assignee: (unassigned) => Massimiliano Pellizzer (mpellizzer)

** Changed in: linux (Ubuntu Noble)
     Assignee: (unassigned) => Massimiliano Pellizzer (mpellizzer)

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/2114174

Title:
  [UBUNTU 24.04] s390/pci: Fix immediate re-add of PCI function after
  remove

Status in linux package in Ubuntu:
  Invalid
Status in linux source package in Noble:
  In Progress
Status in linux source package in Plucky:
  In Progress

Bug description:
  Description:   s390/pci: Fix immediate re-add of PCI function after
  remove

  Symptom:       A PCI function may be reserved directly after being
                 deconfigured. If it subsequently returns back in the standby
                 state Linux may not be able to use the new instance generating
                 a kernel warning about trying to create an already existing
                 sysfs file for the IOMMU.

  Problem:       The problem occurs because the new instance of the same
                 underlying device is created before the prior instance is
                 completely torn down. This happens because the lifetime of the
                 PCI device representation in Linux is determined by reference
                 counts. A driver, the network stack, or even user-space
                 (including via vfio-pci) may be holding onto the device
                 represenation even after the underlying device is gone.

  Solution:      The solution to this is twofold. Firstly allow re-using the
                 pre-existing struct zpci_dev and/or struct pci_dev for the 
newly
                 re-added instance of the underlying device up until the point
                 where the struct zpci_dev is fully removed. Secondly serialize
                 the addition and removal of PCI functions such that re-adding
                 a new instance, after the old one is already being removed, 
will
                 wait for the removal to finish before adding the new instance.
                 This fix also builds on prior upstream work of serializing 
state
                 transitions for PCI devices e.g. from configured to standby.

  Reproduction:  This problem was originally found with firmware which
                 temporarily reserves NETH PCI functions to check for pending
                 service when the last FID of a PCHID is deconfigured. When
                 nothing is pending the PCI function is immediately returned in
                 the standby state, thus triggering this issue quite reliably.

  Upstream-ID:   0d48566d4b58946c8e1b0baac0347616060a81c9
                 bcb5d6c769039c8358a2359e7c3ea5d97ce93108
                 6ee600bfbe0f818ffb7748d99e9b0c89d0d9f02a
                 c4a585e952ca403a370586d3f16e8331a7564901
                 42420c50c68f3e95e90de2479464f420602229fc
                 05a2538f2b48500cf4e8a0a0ce76623cc5bafcf1
                 d76f9633296785343d45f85199f4138cb724b6d2
                 47c397844869ad0e6738afb5879c7492f4691122
                 4b1815a52d7eb03b3e0e6742c6728bc16a4b2d1d
                 774a1fa880bc949d88b5ddec9494a13be733dfa8

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2114174/+subscriptions


-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to